Skip to content

Add benchmarks for real cluster dumps - #14

Draft
ajwdev wants to merge 1 commit into
mainfrom
ajw-bench-real-dumps
Draft

ajwdev wants to merge 1 commit into
mainfrom
ajw-bench-real-dumps

Conversation

@ajwdev

@ajwdev ajwdev commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Summary

Adds two Criterion bench targets, real_bulk_load and real_incremental, that mirror bulk_load and incremental but run against a real cluster dump instead of the synthetic testdata/ fixtures. Also adds load_bench_fixtures_from(dir) to src/engine.rs (with load_bench_fixtures now delegating to it) and gitignores /testdata-real.

This is a benchmark-only change. There is no behavior change to the tool.

What it measures / how to run

  • real_bulk_load: interpreter evaluate vs DD session startup (graph build, worker spawn, initial EDB settle).
  • real_incremental: per-fact add_fact cost, interpreter (add + full re-evaluate) vs DD (incremental commit).

They use their own benchmark names so Criterion's history for the testdata/ benches stays comparable.

Input is a directory of Kubernetes JSON/YAML manifests, default testdata-real/ (gitignored), overridable with PALLOGRAPH_REAL_FIXTURES. The header of benches/real_bulk_load.rs shows a kubectl get ... -o json command to produce one. If the directory is missing the bench prints a message and exits without failing.

cargo bench --bench real_bulk_load
cargo bench --bench real_incremental

Testing

  • cargo check --benches passes.
  • cargo test passes (56 + 56 + 22 tests, 0 failed).
  • The benches themselves were not run in CI-style verification; they need a local dump.

🤖 Generated with Claude Code

Add two Criterion bench targets, real_bulk_load and real_incremental,
that mirror bulk_load and incremental but run against a locally
captured cluster dump instead of the checked-in testdata/ fixtures.
They time bulk load (interpreter vs DD session) and incremental
add_fact (interpreter vs DD) at realistic scale.

They are separate targets with their own benchmark names so Criterion's
per-name regression history for the testdata-based benches is not
polluted. The dump is read from testdata-real/ (override with
PALLOGRAPH_REAL_FIXTURES), which is now gitignored. If the directory is
absent the benches print a message and exit instead of failing, so a
plain cargo bench still works for everyone.

To support this, factor load_bench_fixtures_from(dir) out of
load_bench_fixtures. No behavior change to the tool itself.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ajwdev
ajwdev force-pushed the ajw-bench-real-dumps branch from c8f98e6 to 0d7283f Compare October 2, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant