aboutsummaryrefslogtreecommitdiffstats
path: root/src/simtest
diff options
context:
space:
mode:
Diffstat (limited to 'src/simtest')
-rw-r--r--src/simtest/bench.rs18
-rw-r--r--src/simtest/mod.rs1
2 files changed, 2 insertions, 17 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 [
diff --git a/src/simtest/mod.rs b/src/simtest/mod.rs
index 26e85c7..e9d8c15 100644
--- a/src/simtest/mod.rs
+++ b/src/simtest/mod.rs
@@ -187,7 +187,6 @@ impl Sim {
earlier_actors: Vec::new(),
timing: Timing::new(KEEPALIVE, SYNC_REPLY_TIMEOUT, DELIVERY_LIMIT),
neighbours_k: 8,
- push_changes: false,
alias: Some(id.to_owned()),
dashboard_url: None,
electorate_window: Duration::from_secs(30 * 24 * 3600),