diff --git a/.github/workflows/coverage-gates.yml b/.github/workflows/coverage-gates.yml index 08391375a4..5e05b42173 100644 --- a/.github/workflows/coverage-gates.yml +++ b/.github/workflows/coverage-gates.yml @@ -38,7 +38,7 @@ jobs: - name: Build the pid_ns_helper example used by lock tests # cargo-llvm-cov's instrumented build places test binaries under a - # build-script-shaped path (target/llvm-cov-target/debug/build/...), + # path normally used for compiled build scripts (target/llvm-cov-target/debug/build/...), # so the lock tests' `examples/`-relative-to-test-binary lookup # (docker_lock_test.rs, nfs_lock_test.rs, pid_namespace_test.rs) # never finds the helper. Build it into a target dir cargo-llvm-cov diff --git a/.github/workflows/soak.yml b/.github/workflows/soak.yml index 164043d1aa..cc6e4d3ace 100644 --- a/.github/workflows/soak.yml +++ b/.github/workflows/soak.yml @@ -10,8 +10,9 @@ run-name: >- Soak test (${{ github.event_name == 'workflow_dispatch' && inputs.ref || (github.event.schedule == '0 1 * * 6' && 'v2.x' || 'main') }}) -# #392: grows a file-backed database to 10M+ facts, then churns it (retracts, -# re-asserts, long hot-entity histories) for the rest of the budget, with +# #392: grows a file-backed database to 10M+ facts, then repeatedly retracts +# and reasserts facts for the rest of the run. This creates long histories +# for frequently updated entities, with # thousands of checkpoints and reopens every few minutes. Samples are checked # against a reference throughout; the metrics (file size, open and checkpoint # time, RSS, p50/p99 query latency) are uploaded for the performance envelope diff --git a/benches/helpers/shape.rs b/benches/helpers/shape.rs index de7b7c5977..e88f18ecbe 100644 --- a/benches/helpers/shape.rs +++ b/benches/helpers/shape.rs @@ -1,8 +1,8 @@ -//! The #841 shape-sweep fixtures, queries and oracles for the #863 nightly -//! candidates: a trimmed port of `scripts/shape-sweep/native/src/main.rs` -//! (`records`, `query`, `Digest`, `oracle`), which stays authoritative for the -//! sweep. Entity UUIDs, records and query text are the harness's, so answers -//! are the #841 answers. +//! Fixtures, queries and expected results from the #841 sweep used by the +//! #863 nightly benchmarks and tests. The full sweep remains in +//! `scripts/shape-sweep/native/src/main.rs` (`records`, `query`, `Digest`, +//! `oracle`). This copy uses the sweep's entity UUIDs, records and query text +//! so the expected answers match. //! //! Shared by `benches/minigraf_bench/nightly_candidates.rs` and //! `tests/nightly_candidates_acceptance_test.rs` (`#[path]`). diff --git a/benches/minigraf_bench.rs b/benches/minigraf_bench.rs index 99649c1b9f..ed6610e165 100644 --- a/benches/minigraf_bench.rs +++ b/benches/minigraf_bench.rs @@ -1876,9 +1876,8 @@ fn bench_prepared(c: &mut Criterion) { // ── Retraction ──────────────────────────────────────────────────────────────── // -// Retraction is a first-class bi-temporal operation (logical delete via -// asserted=false fact). These benchmarks measure retraction cost and confirm -// it scales comparably to insertion. +// MiniGraf records a retraction as a fact with asserted=false. These +// benchmarks measure how retraction time changes with database size. fn bench_retract(c: &mut Criterion) { const SCALES: &[(&str, usize)] = &[ diff --git a/benches/minigraf_bench/history.rs b/benches/minigraf_bench/history.rs index bbb9c12ad1..f422a5ea14 100644 --- a/benches/minigraf_bench/history.rs +++ b/benches/minigraf_bench/history.rs @@ -4,7 +4,7 @@ use std::hint::black_box; // ── point_query_chain_depth (Issue #323) ───────────────────────────────────── // // One entity whose :hash is retracted/reasserted `depth` times (exactly one live -// value), plus a never-churned :other on the same entity; checkpointed file DB. +// value), plus an unchanged :other fact on the same entity. The file is checkpointed. pub(super) fn bench_point_query_chain_depth(c: &mut Criterion) { const DEPTHS: &[usize] = &[1, 500, 2000]; diff --git a/benches/minigraf_bench/nightly_candidates.rs b/benches/minigraf_bench/nightly_candidates.rs index f5c5197b79..6f00311e7e 100644 --- a/benches/minigraf_bench/nightly_candidates.rs +++ b/benches/minigraf_bench/nightly_candidates.rs @@ -1,13 +1,13 @@ -//! #863: the #841 shape-sweep candidates qualified for nightly timing, under -//! the existing `^window/`, `^query/` and `^recursion/` routes. +//! Time the #841 workload cases selected in #863 under the existing +//! `^window/`, `^query/` and `^recursion/` routes. //! -//! Fixtures, queries and oracles are `helpers::shape` (the #841 harness's). -//! Each fixture is built lazily inside its selected callback, outside `iter`, -//! and the answer digest is checked once before timing. As in #841, the timed -//! body opens the query, drains its cursor and digests every row. Path, -//! answer and memory are pinned separately, by -//! `tests/nightly_candidates_acceptance_test.rs` (nightly, `test-hooks`): a -//! path regression fails there, while time here can only raise an alert. +//! Fixtures, queries and expected results come from `helpers::shape`. Build +//! each selected fixture in its callback, outside `iter`, and check its answer +//! digest once before timing. The timed section opens the query, reads every +//! row from the cursor and hashes it. The nightly `test-hooks` tests in +//! `tests/nightly_candidates_acceptance_test.rs` check answers, memory and the +//! execution path. A path regression fails those tests; slow timing here +//! only raises an alert. //! Run once, untimed: cargo bench --bench minigraf_bench -- --test 'nightly_candidates/' use crate::helpers::shape::{Shape, drain}; diff --git a/benches/minigraf_bench/operator_paths.rs b/benches/minigraf_bench/operator_paths.rs index 33ba155ab8..e42bbaab7f 100644 --- a/benches/minigraf_bench/operator_paths.rs +++ b/benches/minigraf_bench/operator_paths.rs @@ -91,8 +91,8 @@ pub fn bench_operator_paths(c: &mut Criterion) { // Same 20k facts and 10k output rows in all six controls. Binding the // entity selects Probe; binding a value with a constant attribute selects // ProbeValue (AVET/pending probes). A variable inner attribute selects Hash, - // then an expression keeps :op/right. The hash control deliberately pays - // for that broader scan. Pseudo metadata belongs to the right-hand source. + // then an expression keeps :op/right. The hash-join comparison includes + // the cost of the broader scan. Pseudo metadata belongs to the right-hand source. for (mode, committed) in [("pending", false), ("committed", true)] { for (path, query) in [ ( diff --git a/benches/minigraf_bench/set_storage.rs b/benches/minigraf_bench/set_storage.rs index 93901a8bea..f220bbcf9e 100644 --- a/benches/minigraf_bench/set_storage.rs +++ b/benches/minigraf_bench/set_storage.rs @@ -195,7 +195,8 @@ pub fn bench_set_storage(c: &mut Criterion) { // Four first-write ingest cases include parsing, pending indexes and WAL // creation/header/parent-directory syncs plus the transaction append/sync; // three checkpoint cases isolate v8 inline/long writes and long dedup. - // The scalar ingest control uses exactly the same fresh-file lifecycle. + // For each iteration, the scalar ingest comparison starts with a new file + // and measures the same WAL creation and sync steps as the set cases. for (prefix, checkpoint, shapes) in [ ( "insert_file/set_storage",