From e162f395fcf0c6b09e2908c951ad4301143ae770 Mon Sep 17 00:00:00 2001 From: David Spencer <1526975+DecisionNerd@users.noreply.github.com> Date: Thu, 20 Aug 2026 14:27:01 -0600 Subject: [PATCH 1/2] test(storage): exclude TempDir teardown from walltime --- .../graphforge-storage/benches/m6_storage_io.rs | 6 +++--- scripts/ci/check-m6-benchmarks.py | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/crates/graphforge-storage/benches/m6_storage_io.rs b/crates/graphforge-storage/benches/m6_storage_io.rs index 6ea16331e..84b38c911 100644 --- a/crates/graphforge-storage/benches/m6_storage_io.rs +++ b/crates/graphforge-storage/benches/m6_storage_io.rs @@ -102,10 +102,10 @@ fn seed_generation_chain(root: &std::path::Path, delta_count: usize) { fn durable_commit(bencher: Bencher) { bencher .with_inputs(prepared_publication) - .bench_local_values(|(root, workspace, request)| { + .bench_local_refs(|(root, workspace, request)| { let ProjectStageOutcome::Staged(staged) = stage_project_generation_with_graph_tree( root.path(), - &request, + request, Some(workspace.path()), ) .unwrap() else { @@ -191,7 +191,7 @@ fn spill_compaction(bencher: Bencher) { publish_delta(root.path()); root }) - .bench_local_values(|root| { + .bench_local_refs(|root| { let limits = GraphDeltaCompactionLimits::default(); compact_graph_delta( root.path(), diff --git a/scripts/ci/check-m6-benchmarks.py b/scripts/ci/check-m6-benchmarks.py index fed85b93d..e45e1b359 100644 --- a/scripts/ci/check-m6-benchmarks.py +++ b/scripts/ci/check-m6-benchmarks.py @@ -42,6 +42,23 @@ print("missing M6 benchmarks: " + ", ".join(missing), file=sys.stderr) raise SystemExit(1) +walltime_source = ( + ROOT / "crates/graphforge-storage/benches/m6_storage_io.rs" +).read_text(encoding="utf-8") +for name in ("durable_commit", "spill_compaction"): + function = re.search( + rf"(?ms)^fn\s+{re.escape(name)}\s*\([^)]*\)\s*\{{(.*?)(?=^#\[divan::bench|\Z)", + walltime_source, + ) + if function is None: + raise SystemExit(f"cannot inspect TempDir-backed benchmark {name}") + body = function.group(1) + if ".bench_local_refs(" not in body or ".bench_local_values(" in body: + raise SystemExit( + f"{name} must keep TempDir teardown outside the timed region " + "with bench_local_refs" + ) + workflow = WORKFLOW.read_text(encoding="utf-8") walltime_job = workflow.split(" m6-walltime:\n", 1) if len(walltime_job) != 2: From 69a933d90226eb2c387a362b955a016cb2260331 Mon Sep 17 00:00:00 2001 From: David Spencer <1526975+DecisionNerd@users.noreply.github.com> Date: Thu, 20 Aug 2026 14:52:35 -0600 Subject: [PATCH 2/2] style(ci): format M6 benchmark policy --- scripts/ci/check-m6-benchmarks.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/ci/check-m6-benchmarks.py b/scripts/ci/check-m6-benchmarks.py index e45e1b359..431ffbaf6 100644 --- a/scripts/ci/check-m6-benchmarks.py +++ b/scripts/ci/check-m6-benchmarks.py @@ -42,9 +42,9 @@ print("missing M6 benchmarks: " + ", ".join(missing), file=sys.stderr) raise SystemExit(1) -walltime_source = ( - ROOT / "crates/graphforge-storage/benches/m6_storage_io.rs" -).read_text(encoding="utf-8") +walltime_source = (ROOT / "crates/graphforge-storage/benches/m6_storage_io.rs").read_text( + encoding="utf-8" +) for name in ("durable_commit", "spill_compaction"): function = re.search( rf"(?ms)^fn\s+{re.escape(name)}\s*\([^)]*\)\s*\{{(.*?)(?=^#\[divan::bench|\Z)", @@ -55,8 +55,7 @@ body = function.group(1) if ".bench_local_refs(" not in body or ".bench_local_values(" in body: raise SystemExit( - f"{name} must keep TempDir teardown outside the timed region " - "with bench_local_refs" + f"{name} must keep TempDir teardown outside the timed region with bench_local_refs" ) workflow = WORKFLOW.read_text(encoding="utf-8")