Collapse results and alerts by default in the reports list API#926
Collapse results and alerts by default in the reports list API#926epompeii wants to merge 1 commit into
Conversation
🤖 Claude Code ReviewPR: #926 I've reviewed the full diff. Here is my assessment. Review: Collapse results and alerts by default in the reports list APIOverall this is a well-crafted, well-tested change. It follows the project's TDD methodology (unit tests in CorrectnessThe core risk in this design is that the two count paths disagree:
I traced both against the full-results builder (
The Notable: client-facing breaking change
Minor observations (non-blocking)
Standards compliance
Verdict: Approve. The full/collapsed count-agreement invariant is the load-bearing correctness property and it's both sound and test-covered. The only thing I'd want double-checked before merge is that the CLI-parse breaking change is acceptable for the targeted release, since it's documented as such. Model: claude-opus-4-8 |
978b032 to
210b67f
Compare
|
| Branch | claude/collapse-report-list |
| Testbed | intel-v1 |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result microseconds (µs) (Result Δ%) | Upper Boundary microseconds (µs) (Limit %) |
|---|---|---|---|
| Adapter::Json | 📈 view plot 🚷 view threshold | 4.67 µs(+0.98%)Baseline: 4.62 µs | 4.90 µs (95.21%) |
| Adapter::Magic (JSON) | 📈 view plot 🚷 view threshold | 4.48 µs(-0.42%)Baseline: 4.50 µs | 4.72 µs (94.86%) |
| Adapter::Magic (Rust) | 📈 view plot 🚷 view threshold | 25.80 µs(+1.04%)Baseline: 25.54 µs | 26.64 µs (96.87%) |
| Adapter::Rust | 📈 view plot 🚷 view threshold | 3.52 µs(+1.12%)Baseline: 3.49 µs | 3.60 µs (97.91%) |
| Adapter::RustBench | 📈 view plot 🚷 view threshold | 3.53 µs(+1.34%)Baseline: 3.48 µs | 3.59 µs (98.25%) |
BREAKING CHANGE: GET /v0/projects/{project}/reports now omits the results
and alerts for each report by default. One console reports page could be
~150 MB of JSON, fully buffered by Dropshot before send, driving server
memory spikes and edge egress. Set the new expand query param to true
(bencher report list --expand) to restore the previous behavior.
A new counts field summarizes each report: the number of benchmarks and
distinct measures per iteration and the total and active alerts. It is
always present, computed from the loaded data on the full path and with
cheap aggregate queries on the collapsed path.
The console now renders report rows from counts, lazily fetches the full
report when one is expanded on the perf page, and bootstraps the default
perf plot with a single get-one request.
210b67f to
480fcc9
Compare
Summary
BREAKING CHANGE:
GET /v0/projects/{project}/reportsnow omits theresultsandalertsfor each report by default. One console reports page could be large JSON, fully buffered by Dropshot before send, driving server memory spikes and a large amount of edge egress. Set the newexpandquery param totrue(bencher report list --expand) to restore the previous full-report behavior; the console UI does not use it.A new
countsfield is always present on every report response and mirrors the collapsed fields:Changes
JsonReport.resultsand.alertsare nowOptionwithskip_serializing_if; newcounts: JsonReportCountsfield andexpandquery paramQueryReport::into_jsontakes aReportMode { Full, Collapsed }enum so the compiler forces every call site to choose; only the list endpoint defaults toCollapsed(GET-one, POST, andbencher runstayFull)report_benchmark JOIN metricplus a status-only alert query; the full path computes counts in memory from the loaded data, and a test asserts both paths agreeReportRowrenders fromcounts; the perf Reports tab lazily fetches GET-one when a report is expanded; the perf page default plot bootstrap fetches the first report via GET-onebencher report list --expandflag;bencher runreads its alert count fromcounts;bencher_commenthandles theOptionfieldsopenapi.jsonandbencher.tsCompatibility
An older CLI's
bencher report listcannot parse the new default list response (its generated type requiresresults). Everything else, including olderbencher run, keeps working.Testing
expand=true, GET-one and POST stay full)--expand, and alert counts end to end