Skip to content

bench: FFI round trip for the performance envelope (minigraf#394) - #8

Merged
adityamukho merged 1 commit into
v3from
perf/394-envelope
Oct 11, 2026
Merged

adityamukho merged 1 commit into
v3from
perf/394-envelope

Conversation

@adityamukho

Copy link
Copy Markdown
Contributor

Adds bench/envelope.py. It runs the query shapes of minigraf's examples/perf_envelope.rs (project-minigraf/minigraf#533) through db.query(...) with next_batch(1000), decoding each JSON batch, and reports wall-time p50/p99 and peak RSS next to the Rust numbers from the same JSON report. Each shape runs in its own process, and the fixture is opened read-only. README gets a Benchmarks section.

Results, measured against the core v3 branch at 100K/1M/10M facts, are published in minigraf's docs/BENCHMARKS.md. The binding adds about 70 µs per query, plus about 0.5 µs per returned row for JSON batches, and about 16 MiB of interpreter RSS.

Not run in CI: it needs fixtures of up to 1.2 GiB built by the core harness.

🤖 Generated with Claude Code

https://claude.ai/code/session_012wXxZguv7PgKQjMMH4yJ5h

bench/envelope.py runs the query shapes of minigraf's perf_envelope
harness through db.query() and next_batch(1000), decoding each JSON
batch, and prints p50/p99 and peak RSS next to the Rust numbers from the
same report. Each shape runs in its own process.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012wXxZguv7PgKQjMMH4yJ5h
@adityamukho
adityamukho merged commit 1e77f41 into v3 Oct 11, 2026
4 checks passed
@adityamukho
adityamukho deleted the perf/394-envelope branch October 11, 2026 02:56
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