From ed89f782561eebe281a63e90f6bbdcbb025c2f81 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 4 Nov 2026 20:50:40 +0100 Subject: benchmark where twice comes from --- src/simtest/bench.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/simtest') 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!( -- cgit v1.3.1