Repository navigation
feat(inference): restore Perf Ruler on chip history comparison charts / 推理图表:恢复芯片历史对比图表中的性能标尺 - #1355
Conversation
… / 推理图表:恢复芯片历史对比图表中的性能标尺
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Found 1 test failure on Blacksmith runners: Failure
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0d90281. Configure here.
| const clamped = clampIsoX(Number(ctx.xScale(isoX)), extentA, extentB); | ||
| return clamped === null ? null : Number(ctx.xScale.invert(clamped)); | ||
| }, | ||
| [], |
There was a problem hiding this comment.
Hidden draft curve blocks new rulers
Medium Severity
Legend-hiding the first selected curve leaves an invisible draft in perfRulerState. This chart drops hidden roofline paths, so clampPerfRulerIsoXToOverlap cannot find that curve and nextPerfRulerState rejects every later click. New rulers cannot be placed until the hidden series is shown again or the Perf Ruler toggle is turned off.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 0d90281. Configure here.


Summary
Restore the
Perf Rulertoggle and curve-to-curve iso-x measurement layer onGPUGraphso/inferencechip history comparison charts (when comparing chip configs and/or dates) have the same Perf Ruler support as the single-dateScatterGraph.Perf RulerAdvanced legend switch (#gpu-perf-ruler), info tooltip, andClear rulers (n)action (#gpu-clear-perf-rulers) toGPUGraph.perf-rulerD3 custom layer, widened.perf-ruler-hitstrokes over.roofline-pathcurves (roofline-<date>_<hwKey>_<precision>), point-click measurement in ruler mode, horizontal ruler drag, data-space iso-x persistence across zoom/log-scale changes, axis-metric reset (usePerfRulerAxisReset), and data-based pruning when comparison series leave.docs/d3-charts.mdandpackages/app/cypress/component/gpu-graph.cy.tsxwith component test coverage for both standard chip-comparison curves and measured-power boundaries.AI model disclosure
GPUGraph.tsx, updated docs and Cypress component tests, and ran verification checks.Validation
bun run lint,bun run fmt,bun run typecheck, andbun run check:typographypass.bun --bun vitest run src/lib/d3-chart/layers/perf-ruler.test.ts src/hooks/usePerfRulerAxisReset.test.tsx src/lib/i18n/zh-copy.test.ts(82 tests) pass.?unofficialrun=): not applicable (GPUGraphrenders official chip/date history comparisons).中文说明
恢复
GPUGraph上的“性能标尺”(Perf Ruler)开关及曲线间等横坐标测量图层,使/inference在“对比历史趋势”(选择芯片配置或对比日期)下的图表同样支持性能标尺。GPUGraph图例高级菜单中恢复Perf Ruler(#gpu-perf-ruler)开关、说明提示以及Clear rulers (n)(#gpu-clear-perf-rulers)清除按钮。perf-ruler自定义图层、.roofline-path曲线上的加宽命中区域(.perf-ruler-hit)、标尺模式下点击数据点测量、水平拖动标尺、缩放与对数刻度切换下的 data-space iso-x 保持、切换横纵轴指标时重置标尺(usePerfRulerAxisReset),以及按对比数据存在性清理标尺。docs/d3-charts.md与packages/app/cypress/component/gpu-graph.cy.tsx,覆盖常规芯片对比曲线与实测功率上边界的标尺测试。验证:
bun run lint、bun run fmt、bun run typecheck、bun run check:typography通过;perf-ruler.test.ts、usePerfRulerAxisReset.test.tsx与zh-copy.test.ts(共 82 个单元测试)通过,CI 将继续执行完整单元测试与 Cypress 组件/端到端测试。AI 模型使用说明:Gemini 4 Argon(Perplexity Computer orchestrator),负责恢复
GPUGraph.tsx性能标尺逻辑、更新文档与 Cypress 组件测试并执行本地校验。Note
Medium Risk
Large D3 interaction surface in a core inference chart (click/drag, zoom, metric switches) but reuses existing perf-ruler utilities; regressions would affect chart UX rather than data or auth.
Overview
Restores Perf Ruler on chip/date comparison charts (
GPUGraph) so/inferencehistory comparison matches single-runScatterGraphbehavior: users can click two roofline curves (or points in ruler mode), drag a vertical iso-x ruler, and read the Y-ratio between series across dates or GPUs.The change wires the shared
perf-rulerD3 layer intoGPUGraph: widened.perf-ruler-hitstrokes onroofline-<date>_<hwKey>_<precision>paths, legend Advanced toggle (#gpu-perf-ruler), Clear rulers (n), axis-metric reset viausePerfRulerAxisReset, zoom-aware redraw, and pruning when comparison series disappear. Ruler mode is hidden for modeled chassis power when not on measured-power axes (same restriction as documented). EN/zh copy and analytics events are added.docs/d3-charts.mdnow states Perf Ruler applies to both chart views on measured-power axes. Cypress component tests cover placement/clear on multi-GPU curves and power-boundary measurement, metric-change resets, and Optimal Only stability.Reviewed by Cursor Bugbot for commit 0d90281. Bugbot is set up for automated code reviews on this repo. Configure here.