8000 bench: cover prepared queries in nightly v3 runs (Refs #776) by adityamukho · Pull Request #815 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

bench: cover prepared queries in nightly v3 runs (Refs #776) - #815

Merged
adityamukho merged 1 commit into
v3from
bench/776-p02-prepared
Nov 3, 2026
Merged

adityamukho merged 1 commit into
v3from
bench/776-p02-prepared

Conversation

@adityamukho
Copy link
Copy Markdown
Collaborator

Refs #776 — P02 / G02 (C25/C34): route prepared execution nightly and add preparation, prepared cursor, and typed count/time/entity-slot costs. Workflow companion for main: #814.

The existing four IDs remain unchanged:

  • prepared/value_lookup/{1k,10k}
  • prepared/threshold_filter/{1k,10k}

Eight new IDs use a deterministic 10k in-memory value fixture:

  • prepared/prepare_value_lookup/10k — prepare only; execution is validated outside timing.
  • prepared/unprepared_value_lookup/10k — literal execute control for existing prepared/value_lookup/10k.
  • prepared/cursor_drain/10k and prepared/unprepared_cursor_drain/10k — open and fully drain 5,000 matching rows in batches of 256, including cursor teardown.
  • prepared/count_slots/10k and prepared/unprepared_count_slots/10k — bind :limit 10 and :offset 100, with deterministic integer ordering.
  • prepared/time_entity_slots/10k and prepared/unprepared_time_entity_slots/10k — TxCount, Timestamp and Entity binds select the first of two history transactions at a fixed valid time.

Fixtures, prepared-query construction (except the preparation-only case), bind arrays, literal string construction and expected-result checks are outside timed loops. Each execution path has an equivalent literal control. New code lives in benches/minigraf_bench/prepared.rs, with minimal registration in the main benchmark file.

bench / prepared selects all 12 IDs with ^prepared/, writes bench_prepared.txt, and requests Bencher latency threshold 0.99. It checks the actual checked-out source: without the v3 module (including main's 02:00 run), the suite skips before benchmarks or Bencher uploads. Both workflow copies are identical.

Expected nightly allowance: 4–10 additional job-minutes, unverified (existing four: 2–5; eight new: 2–5). New cases use ten samples, 1s warm-up and a 3s measurement target. Timing, actual workflow selections/uploads and fresh v3 Bencher history belong to the later serial phase-B session. No benchmark workflow dispatch in phase A.

Phase-A validation and both requested gpt-6-astra read-only reviews will be recorded in PR comments. No library behavior, public API, file format, error-code, binary-size gate or coverage-audit document changes. Benchmark-only precedent (a8afaee12, fef18cf59) did not update CHANGELOG, so it is unchanged here.

🤖 Generated with Codex, orchestrated by Claude Code

@adityamukho
Copy link
Copy Markdown
Collaborator Author

Phase-A evidence for P02 / G02 (v3 #815; identical main workflow companion #814).

Untimed validation in .worktrees/776-p02, using private target/p02 and CARGO_BUILD_JOBS=4:

CARGO_BUILD_JOBS=4 CARGO_TARGET_DIR=target/p02 cargo bench --bench minigraf_bench --no-run
CARGO_BUILD_JOBS=4 CARGO_TARGET_DIR=target/p02 cargo bench --bench minigraf_bench -- --test '^prepared/'
CARGO_BUILD_JOBS=4 CARGO_TARGET_DIR=target/p02 cargo fmt --check
CARGO_BUILD_JOBS=4 CARGO_TARGET_DIR=target/p02 cargo clippy --all-features -- -D warnings

All completed successfully. Criterion test mode printed Testing <ID> / Success exactly once for each of the following 12 IDs (eight new, four existing), with no sampling/timing runs:

prepared/value_lookup/1k
prepared/value_lookup/10k
prepared/threshold_filter/1k
prepared/threshold_filter/10k
prepared/prepare_value_lookup/10k
prepared/unprepared_value_lookup/10k
prepared/cursor_drain/10k
prepared/unprepared_cursor_drain/10k
prepared/count_slots/10k
prepared/unprepared_count_slots/10k
prepared/time_entity_slots/10k
prepared/unprepared_time_entity_slots/10k

Untimed checks assert 5,000 rows from each cursor drain, the exact ordered page 100–109 for count slots, and historical value 1 for temporal/entity binds. New cases use matching literal controls. The workflow job is bench / prepared, filter ^prepared/, output bench_prepared.txt, requested latency threshold 0.99.

Both workflow copies are byte-identical. YAML and the exact selection shell were checked: v3 source enables the prepared suite; main source skips it before running/uploading; existing main suites remain enabled.

Review: the requested codex exec -m gpt-6-astra -s read-only review completed for both branches (stdin closed). Both reported no concrete findings. The v3 review included the exact staged source subsequently committed as 42162d6cb; the main review covered 6751a985a. No review findings needed fixing or rejection.

No SSH, timed benchmark, or benchmark-workflow dispatch. Provisional 4–10 job-minute allowance remains unmeasured. Serial phase B must dispatch, confirm executed names/uploads, and establish fresh v3 Bencher history. Both worktrees are retained.

@codecov
codecov Bot commented Nov 3, 2026
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@adityamukho
Copy link
Copy Markdown
Collaborator Author

Phase A complete: all normal CI checks are green at the reviewed/pushed commits:

Both gh pr checks --watch sessions completed successfully. Untimed execution evidence and both clean read-only reviews are recorded above. No fixes or rejected review findings were needed. The worktrees remain in place; neither PR was merged.

Phase B is deliberately pending: serial manual Actions dispatch for timing, executed-ID/upload verification and fresh v3 Bencher history. No benchmark workflow was dispatched in this phase.

Route the four stable prepared execute cases plus eight 10k preparation, cursor and count/time/entity-slot cases through a v3-only prepared nightly job. Keep setup and output checks outside timing, and pair execution paths with literal query controls. Mirror the workflow in the separate main companion.

Co-Authored-By: Codex <noreply@openai.com>
@adityamukho
adityamukho force-pushed the bench/776-p02-prepared branch from 42162d6 to e2931fb Compare November 3, 2026 07:03
@adityamukho
adityamukho merged commit d1d006b into v3 Nov 3, 2026
20 checks passed
@adityamukho
adityamukho deleted the bench/776-p02-prepared branch November 3, 2026 07:18
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

0