Skip to content

feat(inference): restore Perf Ruler on chip history comparison charts / 推理图表:恢复芯片历史对比图表中的性能标尺 - #1355

Merged
functionstackx merged 2 commits into
masterfrom
feat/gpu-graph-perf-ruler
Oct 14, 2026
Merged

functionstackx merged 2 commits into
masterfrom
feat/gpu-graph-perf-ruler

Conversation

@functionstackx

@functionstackx functionstackx commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Restore the Perf Ruler toggle and curve-to-curve iso-x measurement layer on GPUGraph so /inference chip history comparison charts (when comparing chip configs and/or dates) have the same Perf Ruler support as the single-date ScatterGraph.

  • Re-adds the Perf Ruler Advanced legend switch (#gpu-perf-ruler), info tooltip, and Clear rulers (n) action (#gpu-clear-perf-rulers) to GPUGraph.
  • Restores the perf-ruler D3 custom layer, widened .perf-ruler-hit strokes over .roofline-path curves (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.
  • Updates docs/d3-charts.md and packages/app/cypress/component/gpu-graph.cy.tsx with component test coverage for both standard chip-comparison curves and measured-power boundaries.

AI model disclosure

  • Model/version: Gemini 4 Argon (Perplexity Computer orchestrator)
  • Role: Restored Perf Ruler wiring in GPUGraph.tsx, updated docs and Cypress component tests, and ran verification checks.

Validation

  • bun run lint, bun run fmt, bun run typecheck, and bun run check:typography pass.
  • 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.
  • Overlays (?unofficialrun=): not applicable (GPUGraph renders official chip/date history comparisons).
  • I have completed the AI model disclosure and kept it current

中文说明

恢复 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 /inference history comparison matches single-run ScatterGraph behavior: 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-ruler D3 layer into GPUGraph: widened .perf-ruler-hit strokes on roofline-<date>_<hwKey>_<precision> paths, legend Advanced toggle (#gpu-perf-ruler), Clear rulers (n), axis-metric reset via usePerfRulerAxisReset, 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.md now 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.

… / 推理图表:恢复芯片历史对比图表中的性能标尺
@vercel

vercel Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
inferencemax-app Ready Ready Preview Oct 14, 2026 9:32pm UTC

Request Review

@blacksmith-sh

blacksmith-sh Bot commented Oct 14, 2026

Copy link
Copy Markdown

Found 1 test failure on Blacksmith runners:

Failure

Test View Logs
GPUGraph/places and clears perf rulers across chip history comparison curves View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@functionstackx
functionstackx merged commit 93dad74 into master Oct 14, 2026
34 of 35 checks passed
@functionstackx
functionstackx deleted the feat/gpu-graph-perf-ruler branch October 14, 2026 21:33

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ 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));
},
[],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0d90281. Configure here.

This branch was successfully deployed

1 active deployment
Preview — 0d902812 Deployed Oct 14, 2026 by vercel[bot]
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