aboutsummaryrefslogtreecommitdiffstats
path: root/src/simtest
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-04 20:50:40 +0100
committertv <tv@krebsco.de>2026-11-04 20:50:40 +0100
commited89f782561eebe281a63e90f6bbdcbb025c2f81 (patch)
tree63046f33f9952688fbf392b703b44ebc1c31e193 /src/simtest
parentdfd394f5ac2b12d43c4c556497938790ca56310f (diff)
benchmark where twice comes from
Diffstat (limited to 'src/simtest')
-rw-r--r--src/simtest/bench.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/simtest/bench.rs b/src/simtest/bench.rs
index 6bf3bd6..ecf44a5 100644
--- a/src/simtest/bench.rs
+++ b/src/simtest/bench.rs
@@ -233,6 +233,8 @@ impl Totals {
relay.delivered_bytes += stats.relay.delivered_bytes;
relay.nothing_new += stats.relay.nothing_new;
relay.nothing_new_bytes += stats.relay.nothing_new_bytes;
+ relay.nothing_new_along_trees += stats.relay.nothing_new_along_trees;
+ relay.nothing_new_delivered += stats.relay.nothing_new_delivered;
for (_, peer_state) in node.peers_snapshot().await {
totals.incidents.add(&peer_state.lock().await.incidents);
}
@@ -500,8 +502,13 @@ fn report(
);
let _ = writeln!(
out,
- " sync per write: {:.1} taken as delivered ({:.0} bytes each), {:.1} with only changes the receiver had ({:.0} bytes each)",
- delivered.0, delivered.1, nothing_new.0, nothing_new.1,
+ " sync per write: {:.1} taken as delivered ({:.0} bytes each), {:.1} with only changes the receiver had ({:.0} bytes each; {:.1} along trees, {:.1} taken as delivered)",
+ delivered.0,
+ delivered.1,
+ nothing_new.0,
+ nothing_new.1,
+ (r1.nothing_new_along_trees - r0.nothing_new_along_trees) as f64 / writes,
+ (r1.nothing_new_delivered - r0.nothing_new_delivered) as f64 / writes,
);
let (i0, i1) = (during.0.incidents, during.1.incidents);
let _ = writeln!(