8000 Clarify benchmark guide wording (main) by adityamukho · Pull Request #980 · 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
43 changes: 23 additions & 20 deletions docs/BENCHMARKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,28 @@

This document records reproducible local benchmark snapshots. Completed release-performance history belongs in the [CHANGELOG](../CHANGELOG.md); continuous CI history is available on [Bencher](https://bencher.dev/perf/minigraf/plots).

## JVM/WASI nightly lanes (#858, unreleased)

The core workflow defines 14 JVM and 3 WASI routes with separate Ubuntu 24.04
histories, pinned runtimes, exact-result checks, raw sample medians and artifact
provenance. See [binding benchmarks](BINDING_BENCHMARKS.md) for timing boundaries
and the Java adapter contract. The adapter is merged in `minigraf-java` (`0a2d4d657`).
Both lanes are live and reported on their first scheduled v3 run. The mobile
qualification rejected every case on the iOS simulator and the Android emulator, so no
mobile lane is enabled ([report](benchmarks/858-mobile-qualification/REPORT.md)). Absolute nightly
timings stay in Bencher; this file claims none.

## Failure paths (#843, unreleased)

The [X08 map](benchmarks/843-failure-correctness/README.md) assigns invalid
bounds, windows and binds, callback errors, exhaustion, corrupt pages,
failed-handle retry, v1–v6 refusal and heavy single-entry WAL replay to
correctness tests rather than nightly IDs. The C08 rebuild and C30 rollback IDs
time successful work around one fixed failure; they are not failure-latency
measurements.
## Nightly JVM and WASI benchmarks (#858, unreleased)

The core workflow runs 14 JVM cases with Temurin 17.0.17+10 and three WASI
cases with Wasmtime 49.0.2 on Ubuntu 24.04. Each job checks exact results,
reports medians from its raw samples, and records which inputs and artifacts
it used. See [binding benchmarks](BINDING_BENCHMARKS.md) for what is timed and
how the Java adapter works. The adapter is merged in `minigraf-java`
(`0a2d4d657`). Both jobs reported results on their first scheduled 3.x run.
None of the iOS simulator or Android emulator cases met the qualification
criteria, so the workflow does not run mobile benchmarks
([report](benchmarks/858-mobile-qualification/REPORT.md)). Bencher holds the
nightly timings and a separate history for each runtime.

## Failure cases (#843, unreleased)

The [X08 map](benchmarks/843-failure-correctness/README.md) lists correctness
tests for invalid bounds, windows and bind values; callback errors; exhaustion;
corrupt pages; retries on a failed handle; refusal of v1–v6 files; and replay of
a large single WAL entry. These are not nightly benchmarks. C08 measures
successful index rebuilding for a fixture with a damaged AVET root, and C30 measures
successful rollback after one specified failure. Neither measures how long it
takes to return the error.

## Semantic permutations and control limits (#842, unreleased)

Expand Down Expand Up @@ -927,7 +930,7 @@ The later [#530 comparison](#projected-uuid-lookup-batching-530-unreleased) meas

New to the #551 all-shapes table: `ordered_values`, all eight `expr_*` variants, `limit` and `top_k`. The last two have earlier [#306 measurements](#limit-306): `limit` is now 17.5% / 22.9% / 24.5% faster and `top_k` 14.9% / 13.8% / 15.9% faster at 100K / 1M / 10M. `hot_current` and `hot_as_of` were already measured by #551. The 1M irregular-timestamp fixture was not rerun.

**Regression review:** no query p50 is demonstrably more than 25% slower than the published #551 ranges; the grouped baselines leave that threshold unresolved for `join_2_pseudo` and `valid_at` at 100K. Against the previous README's #551 figures, opening at 10M rose from 0.13–0.23 ms to 0.409 ms (+78% to +215%). Tail latency also rose: `valid_at` at 10M is 34.66 µs p99 versus the grouped 22–27 µs (+28% to +58%); `point_entity` and `as_of` are 31.90 and 33.22 µs (at least +18% and +23%). Checkpoint p99 at 10M is 3.30 ms versus 2.2–2.9 ms (+14% to +50%). These snapshots do not establish the causes. The storage table also replaces the older 2026-10-11 laptop run; it is not a same-host regression baseline.
**Regression review:** no query p50 is demonstrably more than 25% slower than the published #551 ranges; the grouped baselines leave that threshold unresolved for `join_2_pseudo` and `valid_at` at 100K. Against the previous README's #551 figures, opening at 10M rose from 0.13–0.23 ms to 0.409 ms (+78% to +215%). Tail latency also rose: `valid_at` at 10M is 34.66 µs p99 versus the grouped 22–27 µs (+28% to +58%); `point_entity` and `as_of` are 31.90 and 33.22 µs (at least +18% and +23%). Checkpoint p99 at 10M is 3.30 ms versus 2.2–2.9 ms (+14% to +50%). These snapshots do not establish the causes. The storage table also replaces the older 2026-10-11 laptop run; it is not a same-host regression baseline. A later [same-server A/B comparison](https://github.com/project-minigraf/minigraf/issues/963#issuecomment-7281196953) did not reproduce the reported 10M open-latency regression. It is a separate measurement, not a replacement for these snapshots.

### Fixture

Expand Down
60 changes: 31 additions & 29 deletions docs/BINDING_BENCHMARKS.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
# Binding benchmarks (#776 P16)

The accepted [#839 manual evidence](benchmarks/839-bindings/README.md) remains
historical evidence. #858 adds core workflow support for JVM (14 IDs) and WASI
(3 IDs), alongside the existing 26 Python/browser/Node/C IDs. The Java nightly
adapter is merged in `minigraf-java` v3 (`0a2d4d657`) and the identical default-branch
CI companion is merged (main `b2ad8c24f`). The first scheduled v3 run (2026-11-19) reported
both lanes; live notification checks and the evidence archive are in
[the evidence directory](benchmarks/858-binding-nightlies/). The mobile
simulator/emulator study rejected every case on both platforms and activates no mobile lane
([report](benchmarks/858-mobile-qualification/REPORT.md)). Measured lane limits are at the end of
this file.

The `bindings` matrix in `.github/workflows/bench.yml` measures the once-resolved
core SHA. JVM checks out `minigraf-java`; WASI has no binding repository. The
14:00 UTC schedule measures v3; main/v2 checkouts skip with a step-summary note
and no uploads. A required harness or artifact missing on v3 fails the job.
Reporting JS/shell helpers come from `github.workflow_sha`. All core harness
Python, including `validate.py` for both JVM and WASI and the WASI driver/adapter,
runs from the measured core checkout. The WASI provenance hashes that same
`validate.py`; a different or missing workflow-checkout copy has no effect.
Both checkout identities are recorded.

This is the F1 option (b) design: the default-branch sparse checkout needs only
`.github/bench/`, and main does not need `benchmarks/bindings839/`. The shared
`bench-report.yml` keeps its harness path triggers and runs Python unit tests
only when `hashFiles('benchmarks/bindings839/test_*.py')` finds tests. Its Node
tests have self-contained fixtures and run on both branches. This reporting-CI
guard does not apply to measurement: a missing measured v3 validator fails both
JVM and WASI jobs, and missing WASI drivers also fail.
The [#839 report](benchmarks/839-bindings/README.md) records the earlier manual
measurements. #858 added 14 JVM and three WASI cases to the core workflow,
alongside the 26 Python/browser/Node/C cases. The Java adapter landed in
`minigraf-java` (`0a2d4d657`); the core default-branch workflow gained the same
support (`b2ad8c24f`). The first scheduled 3.x run (2026-11-19) reported both
jobs. See the [run records](benchmarks/858-binding-nightlies/) for the
notification checks and archived outputs. No iOS simulator or Android emulator
case qualified, so the workflow does not schedule mobile measurements
([report](benchmarks/858-mobile-qualification/REPORT.md)). This file ends with
the measured time and repeatability limits.

The `bindings` matrix in `.github/workflows/bench.yml` resolves the measured
core commit once and uses it for every job. The 14:00 UTC slot measures 3.x
(`main` since #937). The 02:00 UTC slot measures `v2.x`; all six binding jobs
skip on that checkout, leaving a step-summary note and uploading no results. JVM also checks out `minigraf-java`;
WASI does not need a separate binding repository. A required harness or
artifact missing on the measured 3.x checkout fails its job.

The workflow checks out `.github/bench/` from `github.workflow_sha` for the
reporting JS and shell helpers. The benchmark Python, including the JVM/WASI
`validate.py` and WASI driver and adapter, comes from the measured core
checkout. The WASI artifact record hashes that measured `validate.py`; a
different copy in the workflow checkout has no effect. The reports record both
the measured core commit and the workflow commit.

The shared `bench-report.yml` keeps its harness path triggers. It runs the
Python unit tests only when `hashFiles('benchmarks/bindings839/test_*.py')`
finds them; the Node tests use self-contained fixtures on both branches. That
test rule does not change measurement: a missing measured 3.x validator
fails both JVM and WASI jobs, and missing WASI drivers also fail.

Manual dispatch can set `jvm-ref` for a Java-only experiment, leaving every
other binding on `binding-ref` (default `main`, the 3.x line; `v3` before #937). `binding-ref` still selects a
Expand Down Expand Up @@ -309,7 +311,7 @@ measured is labelled an estimate.
- The scheduled v3 run started about 8 hours after its 14:00 UTC slot, so a late
scheduled start is a normal observed behaviour and the lane does not assume punctuality.
- The first scheduled JVM run raised one alert (`binding/jvm/prepare/point`, 42,824 ns against an upper
limit of 38,991 ns) against a baseline of only three prior v3 points; it is a young-history signal, not a regression finding.
limit of 38,991 ns). The baseline had only three earlier 3.x measurements, which was not enough to establish a regression.
- Physical Android units differ: Device Farm may assign another Pixel 7 build; the collector
rejected four attempts that landed on a different build and retried them.
- Repeatability limits: the qualification gate requires a sample CV of at most 15% and at most twice the
Expand Down
Loading
0