fix score inflation for throttled nodes (#6842)

This commit is contained in:
Jędrzej Stuczyński
2026-06-01 14:08:06 +01:00
committed by GitHub
parent 14a85901b4
commit aa7b1e939a
2 changed files with 8 additions and 1 deletions
@@ -1,7 +1,7 @@
[package] [package]
name = "nym-network-monitor-agent" name = "nym-network-monitor-agent"
description = "Agent used for stress testing Nym mixnodes" description = "Agent used for stress testing Nym mixnodes"
version = "1.0.3" version = "1.0.4"
authors.workspace = true authors.workspace = true
edition.workspace = true edition.workspace = true
license.workspace = true license.workspace = true
@@ -350,6 +350,13 @@ impl NodeStressTester {
"did not manage to send all required packets within the sending window. sent {sent}/{total_packets}" "did not manage to send all required packets within the sending window. sent {sent}/{total_packets}"
); );
} }
// Report `total_packets` (= expected) rather than `sent` so the orchestrator's
// `received / sent` score formula effectively becomes `received / expected` -
// a node that throttled us via TCP back-pressure into not pushing all packets
// through is correctly penalised. Per-batch `set_packets_sent(sent)` updates
// above remain in place for the `Ok(false)` early-exit (send error) path, so
// partial-progress visibility is preserved when the test aborts mid-run.
result.set_packets_sent(total_packets);
Ok(true) Ok(true)
} }