8000 Clarify benchmark and CI test comments on main by adityamukho · Pull Request #992 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/coverage-gates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/soak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions benches/helpers/shape.rs
Original file line number Diff line number Diff line change
@@ -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]`).
Expand Down
5 changes: 2 additions & 3 deletions benches/minigraf_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)] = &[
Expand Down
2 changes: 1 addition & 1 deletion benches/minigraf_bench/history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
18 changes: 9 additions & 9 deletions benches/minigraf_bench/nightly_candidates.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
4 changes: 2 additions & 2 deletions benches/minigraf_bench/operator_paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 [
(
Expand Down
3 changes: 2 additions & 1 deletion benches/minigraf_bench/set_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading
0