8000 ci(bench): route row-frame nightly shortlist (P01) by adityamukho · Pull Request #812 · 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
28 changes: 26 additions & 2 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,13 @@ jobs:
filter: "^window/"
file: bench_window.txt

# ── Bounded row frames (v3 only, #776 P01) ───────────────────────────
# 18 existing IDs; reserve 5–15 job-minutes pending phase-B timing.
# See docs/BENCHMARKS.md for the selection and remaining manual sweep.
- name: window_rows
filter: "^window_rows/((10000|100000)/(one|hundred)/sum/(zero|two|prefix)|100000/hundred/(min|max)/(two|prefix)|10000/hundred/frame_bench_sum/two|100000/hundred/frame_bench_sum/prefix)$"
file: bench_window_rows.txt

# ── Temporal metadata ───────────────────────────────────────────────
- name: temporal_metadata
filter: "^temporal_metadata/"
Expand Down Expand Up @@ -250,6 +257,18 @@ jobs:
path: target
key: ${{ runner.os }}-bench-target-${{ hashFiles('**/Cargo.lock', 'benches/**', 'src/**/*.rs') }}

# Inspect the actual checkout: manual refs can be branches, tags or SHAs.
# Main has no row-frame group; skip its run and upload without empty data.
- name: Check row-frame suite availability
id: row_frames
if: matrix.name == 'window_rows'
run: |
if git grep -q -F 'fn bench_window_rows(' HEAD -- benches/minigraf_bench.rs; then
echo "available=true" >> "$GITHUB_OUTPUT"
else
echo "Skipping window_rows: no row-frame suite in $(git rev-parse HEAD)" >> "$GITHUB_STEP_SUMMARY"
fi

- name: Download benchmark enumeration
uses: actions/download-artifact@v7
with:
Expand All @@ -258,20 +277,25 @@ jobs:
# Select from the shared listing without rerunning any fixture setup.
# Every required matrix route must be nonempty before measurement starts.
- name: Verify selected IDs
if: matrix.name != 'window_rows' || steps.row_frames.outputs.available == 'true'
run: node .bench-workflow/.github/bench/report.cjs select

- name: Run benchmarks (${{ matrix.name }})
id: benchmarks
if: matrix.name != 'window_rows' || steps.row_frames.outputs.available == 'true'
run: |
set -o pipefail
CARGO_TERM_COLOR=never cargo bench --bench minigraf_bench -- "$BENCH_FILTER" \
2>&1 | tee "$BENCH_FILE"
node .bench-workflow/.github/bench/report.cjs execution

- name: Install Bencher CLI
if: steps.benchmarks.outcome == 'success'
uses: bencherdev/bencher@v0.4.25

- name: Upload to Bencher
id: bencher
if: steps.benchmarks.outcome == 'success'
continue-on-error: true
run: |
set -o pipefail
Expand Down Expand Up @@ -449,13 +473,13 @@ jobs:
# Run even when selection, measurement or upload failed. Alerts keep the
# existing two-run reporting policy; API/partial/empty uploads fail the job.
- name: Verify reporting and summarize
if: always()
if: always() && (matrix.name != 'window_rows' || steps.row_frames.outputs.available == 'true')
env:
BENCHER_OUTCOME: ${{ steps.bencher.outcome }}
run: node .bench-workflow/.github/bench/report.cjs finish

- name: Retain coverage evidence
if: always()
if: always() && (matrix.name != 'window_rows' || steps.row_frames.outputs.available == 'true')
uses: actions/upload-artifact@v6
with:
name: bench-evidence-${{ strategy.job-index }}
Expand Down
33 changes: 33 additions & 0 deletions docs/BENCHMARKS.md
6EB5
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,39 @@ The UDF benchmark registers an integer sum with a fresh accumulator per bounded

The harness omits the quadratic 100,000-row, half-partition UDF case. The large-case query scan and result materialization dominate the built-in timings; this snapshot checks relative growth of this complete query shape, not isolated deque or sum-step throughput.

### Nightly row-frame shortlist (#776 P01)

The `bench / window_rows` job selects 18 existing IDs with this exact filter:

```text
^window_rows/((10000|100000)/(one|hundred)/sum/(zero|two|prefix)|100000/hundred/(min|max)/(two|prefix)|10000/hundred/frame_bench_sum/two|100000/hundred/frame_bench_sum/prefix)$
```

This covers sum frames of zero, two and prefix width at 10k/100k rows with
one/100 partitions (12 cases), plus min/max two-versus-prefix deque controls
at 100k rows with 100 partitions (4 cases). The remaining two cases exercise
the bounded UDF replay at 10k rows and its full-prefix running-accumulator
control at 100k rows, both with 100 partitions. The UDF pair covers different
execution paths and scales; it is not a same-size latency comparison.
Fixtures and UDF registration remain outside the timed loop; IDs are unchanged.

The workflow checks the selected checkout for `bench_window_rows` and skips
this job's measurement and Bencher upload when it is absent, including main's
02:00 UTC run. The v3 run is at 14:00 UTC. Results use
`bench_window_rows.txt`, the existing latency reporting path and shared
0.999 threshold. Reserve **5–15 job-minutes**, an unverified planning allowance;
phase B must dispatch serially and verify executed IDs, uploads and runtime
before this route is treated as measured nightly coverage.

The other 110 registered cases remain a deliberate manual sweep: default,
sqrt and half widths, count/avg, the remaining min/max combinations and UDF
zero/half/one-partition variants. Run the full `^window_rows/` selection only
on idle hardware under the release performance review; expensive replay
cases do not belong in every nightly run. The unregistered 100k half-partition
UDF case remains excluded for quadratic callback cost. An untimed local check
of the shortlist uses `cargo bench --bench minigraf_bench -- --test '<filter>'`
with the exact filter above.

## Performance Envelope (v3.0.0, #394)

**Version**: `v3` branch (format v8), unreleased · **Date**: 2026-10-11 · **Command**: `cargo run --profile envelope --example perf_envelope -- --scales 100k,1m,10m` · Intel Core i7-1065G7 (4 cores / 8 threads, 16 GB RAM), Rust 1.94.0, Linux 6.12.108, on AC power and otherwise idle; the `.graph` file on an SSD with the OS page cache warm.
Expand Down
Loading
0