Add a Y-Axis scale toggle to perf plots#947
Conversation
🤖 Claude Code ReviewPR: #947 I've reviewed the full diff. Here is my assessment. Review: Add a Y-Axis scale toggle to perf plotsOverall this is a clean, well-tested, and complete change. It threads a new Strengths
Correctness note (not a bug)
Minor observations (optional)
Standards compliance
Verification I did not run: I reviewed statically but did not execute One process reminder: per CLAUDE.md, since this PR changes the CLI ( Model: claude-opus-4-8 |
|
| Branch | claude/plot-y-axis |
| 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.69 µs(+0.94%)Baseline: 4.65 µs | 4.90 µs (95.71%) |
| Adapter::Magic (JSON) | 📈 view plot 🚷 view threshold | 4.59 µs(+1.56%)Baseline: 4.52 µs | 4.72 µs (97.18%) |
| Adapter::Magic (Rust) | 📈 view plot 🚷 view threshold | 25.51 µs(-0.45%)Baseline: 25.63 µs | 26.75 µs (95.39%) |
| Adapter::Rust | 📈 view plot 🚷 view threshold | 3.52 µs(+0.73%)Baseline: 3.50 µs | 3.60 µs (97.72%) |
| Adapter::RustBench | 📈 view plot 🚷 view threshold | 3.52 µs(+0.81%)Baseline: 3.49 µs | 3.60 µs (97.83%) |
fc2cd65 to
04daea3
Compare
Add a three-mode Y-Axis scale to perf plots: Auto, Linear, and Log. Auto preserves the existing adaptive power scaling. Log uses a true logarithmic scale and falls back to Auto when the data includes zero or negative values. The selection is saved in the plot URL and restored for pinned plots. It can be set at creation with `bencher plot create --y-axis` and changed with `bencher plot update --y-axis`, the Perf explorer "Update Pin" button, or the plot PATCH endpoint.
04daea3 to
29461a5
Compare
What
Add a three-mode Y-Axis scale to perf plots: Auto, Linear, and Log.
The selection is:
y_axison plot create and update) and CLI (bencher plot create --y-axis,bencher plot update --y-axis)How
YAxisenum (auto|linear|log) inbencher_json, stored on theplottable via a new migration as an integer column with strong DieselToSql/FromSqlimpls#[serde(default)]keeps existing API clients and pinned plots working: an omittedy_axismeansauto, matching prior behaviory_axisis included inJsonPlotPatch/JsonPlotPatchNullandUpdatePlot, soPATCH /v0/projects/{project}/plots/{plot}can change it in placeLinePlot.tsxintoscale.tswith unit tests covering all three modes and the zero/negative fallbackTesting
cargo nextest run -p bencher_json --features serverand-p bencher_schema --features plusnpx vitest run, including newscale.test.tscargo clippy --no-deps --all-targets --all-features -- -Dwarnings,cargo check --no-default-features,cargo gen-types, Biome CI lint/format commands