fix score inflation for throttled nodes (#6842)
This commit is contained in:
committed by
GitHub
parent
14a85901b4
commit
aa7b1e939a
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "nym-network-monitor-agent"
|
||||
description = "Agent used for stress testing Nym mixnodes"
|
||||
version = "1.0.3"
|
||||
version = "1.0.4"
|
||||
authors.workspace = true
|
||||
edition.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}"
|
||||
);
|
||||
}
|
||||
// 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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user