aboutsummaryrefslogtreecommitdiffstats
path: root/src/simtest/soak.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-07 00:49:05 +0100
committertv <tv@krebsco.de>2026-11-07 00:49:05 +0100
commit4eb8eda89db812c3aa40f0226853aa9a20809a92 (patch)
tree102892d50e2cf4efbd9ceb777e599c403ecdcff3 /src/simtest/soak.rs
parent6d0ef1dd825805cee445fc1dd40337151a8cafb6 (diff)
soak plumtree links along the wayHEADmaster
Diffstat (limited to 'src/simtest/soak.rs')
-rw-r--r--src/simtest/soak.rs32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/simtest/soak.rs b/src/simtest/soak.rs
index 6285e2c..43dfa5d 100644
--- a/src/simtest/soak.rs
+++ b/src/simtest/soak.rs
@@ -198,6 +198,15 @@ async fn soak_with_churn() {
let mut away: Option<(String, Instant)> = None;
let (mut joined, mut remade) = (false, false);
let mut writes = 0usize;
+ // PlumTree's links along the way (nothing for another dissemination): once the one
+ // writer is done, and before the remake; with the PRUNEs and GRAFTs sent until then.
+ let mut along = String::new();
+ let plumtree_sent = |nodes: &[AppState]| -> u64 {
+ nodes
+ .iter()
+ .map(|node| node.traffic.total().sent.plumtree.messages)
+ .sum()
+ };
while start.elapsed() < total {
let now = Instant::now();
if let Some((id, until)) = &away
@@ -225,10 +234,26 @@ async fn soak_with_churn() {
next_restart += RESTART_EVERY;
}
if !joined && start.elapsed() >= CHURN_WORKLOAD {
+ let mut links = String::new();
+ super::bench::eager_links(&mut links, &nodes, &sim.net);
+ if !links.is_empty() {
+ along.push_str(&format!(
+ " after the one writer ({} PRUNE and GRAFT sent):\n{links}",
+ plumtree_sent(&nodes)
+ ));
+ }
nodes.push(sim.start_with(&ids[CHURN_NODES - 1], &[genesis], Start::Join, timing));
joined = true;
}
if !remade && start.elapsed() >= total - CHURN_WORKLOAD / 5 {
+ let mut links = String::new();
+ super::bench::eager_links(&mut links, &nodes, &sim.net);
+ if !links.is_empty() {
+ along.push_str(&format!(
+ " before the remake, writers in turn ({} PRUNE and GRAFT sent):\n{links}",
+ plumtree_sent(&nodes)
+ ));
+ }
let (status, report) =
crate::remake::testing::start(nodes[0].clone(), json!({ "kind": "compact" }), None)
.await;
@@ -321,6 +346,13 @@ async fn soak_with_churn() {
);
super::bench::sent_kept(&mut out, &nodes).await;
neighbour_counts(&mut out, &nodes, "at the end");
+ out.push_str(&along);
+ if !along.is_empty() {
+ out.push_str(&format!(
+ " at the end ({} PRUNE and GRAFT sent):\n",
+ plumtree_sent(&nodes)
+ ));
+ }
// For PlumTree and HyParView: their links and views at the end (nothing otherwise).
super::bench::eager_links(&mut out, &nodes, &sim.net);
super::bench::active_views(&mut out, &nodes);