aboutsummaryrefslogtreecommitdiffstats
path: root/src/simtest/bench.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-05 05:20:00 +0100
committertv <tv@krebsco.de>2026-11-05 05:20:00 +0100
commit18bc1b2e36bacae45ee3a0f485a117f3756152d7 (patch)
tree714ca665aa51bce43e144f398b40d57fccf08a0f /src/simtest/bench.rs
parent3f660a5886b8face0d9bd117cb63be9ed0cfd6f2 (diff)
push by default
Diffstat (limited to 'src/simtest/bench.rs')
-rw-r--r--src/simtest/bench.rs18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/simtest/bench.rs b/src/simtest/bench.rs
index 91b0aa7..19603d2 100644
--- a/src/simtest/bench.rs
+++ b/src/simtest/bench.rs
@@ -40,13 +40,6 @@ const ONLY: &str = "BENCH_SCENARIO";
/// cores, but they share them, so delays (and what depends on timing) may come out
/// higher than alone; message counts barely.
const PARALLEL: &str = "BENCH_PARALLEL";
-/// If `1`, changes along writers' trees go as they are, not in Automerge sync messages
-/// (`AppState::push_changes`): `BENCH_PUSH=1`, to measure against.
-const PUSH: &str = "BENCH_PUSH";
-
-fn pushing() -> bool {
- std::env::var(PUSH).is_ok_and(|value| value == "1")
-}
const SETTLE: Duration = Duration::from_secs(180);
/// How the swarm is made.
@@ -439,12 +432,10 @@ async fn run(seed: u64, scenario: &'static Scenario) -> String {
let ids: Vec<String> = (0..scenario.nodes).map(|i| format!("n{i:03}")).collect();
(scenario.net)(&sim, &ids);
let reply_timeout = scenario.reply_timeout.unwrap_or(SYNC_REPLY_TIMEOUT);
- let push = pushing();
let timing = move |config: &mut crate::node::NodeConfig| {
config.timing = Timing::new(KEEPALIVE, reply_timeout, DELIVERY_LIMIT);
// As in production (`--neighbours`).
config.neighbours_k = 12;
- config.push_changes = push;
};
let mut nodes = vec![sim.start_on_with(&ids[0], (scenario.on)(0), &[], Start::Genesis, timing)];
// Those there from the start; the others join during the workloads.
@@ -495,15 +486,10 @@ async fn run(seed: u64, scenario: &'static Scenario) -> String {
let _ = writeln!(
out,
- "\n{} ({} writes at {} a second each{})",
+ "\n{} ({} writes at {} a second each)",
scenario.name,
WRITES,
- 1000 / WRITE_EVERY.as_millis(),
- if pushing() {
- "; changes pushed along trees"
- } else {
- ""
- }
+ 1000 / WRITE_EVERY.as_millis()
);
let mut joined = initial;
for (w, (workload, writer)) in [