Show selected percentile in agentic x-axis titles for Interactivity / E2E Latency / 智能体场景 Interactivity 与 E2E Latency x 轴标题显示所选百分位 - #639
Merged
Conversation
…2E Latency x-axis labels
On agentic scenarios the chart plots percentile fields (p75_intvty /
p90_intvty, p75_e2el / p90_e2el), but the x-axis labels for the regular
Interactivity and E2E Latency modes still rendered the raw config labels
("Interactivity (tok/s/user)", "End-to-end Latency (s)") because the
agentic relabel only REPLACED an existing leading statistic word and the
base config labels carry none. Extract the rewrite into
applyAgenticPercentileToXLabel, which prefixes the selected percentile
when absent and still replaces an existing prefix (TTFT override labels)
without doubling. Fixed-seq labels are untouched (isAgentic guard), and
the unofficial-run overlay path shares the same chartDefinition label so
it is covered by the same fix.
中文:智能体(agentic)场景下图表绘制的是百分位字段(p75_intvty /
p90_intvty、p75_e2el / p90_e2el),但常规 Interactivity 与 E2E Latency
模式的 x 轴标题仍显示原始配置标签,未带百分位前缀。本次将改写逻辑提取为
applyAgenticPercentileToXLabel:标签无统计词前缀时补上所选百分位,已有
前缀(如 TTFT 覆盖标签)时替换而不重复。固定序列场景标签保持不变;
非官方运行叠加路径复用同一 chartDefinition 标签,因此同样生效。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ult x-axis mode The agentic percentile axis-label assertions relied on Interactivity being the agentic default x-axis mode. A parallel change makes OSL / E2EL the agentic default, which would break these assertions on merge regardless of landing order. Click the Interactivity / E2E mode buttons explicitly before asserting labels, stub /api/v1/derived-agentic-metrics before the agentic visits (so a derived default mode never sits on its loading skeleton), and add the osl_per_e2el fields to the derived-metrics fixture. Fixed-seq default assertions are unchanged. 中文:智能体百分位轴标签断言此前依赖 Interactivity 作为智能体默认 x 轴模式;另一并行改动将默认模式改为 OSL / E2EL,无论合并顺序都会 使这些断言失效。现改为在断言前显式点击 Interactivity / E2E 模式按钮, 在访问智能体页面前 stub /api/v1/derived-agentic-metrics(避免派生 默认模式停留在加载骨架屏),并在派生指标 fixture 中补充 osl_per_e2el 字段。固定序列默认断言保持不变。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
cquil11
added a commit
that referenced
this pull request
Jul 28, 2026
…c-osl-e2el-metric Conflict resolution in ttft-x-axis-toggle.cy.ts: keep this branch's shared interceptDerivedAgenticMetrics helper (the spec-local stub with retired metric fields dies), keep the OSL / E2EL default-mode test, and carry forward #639's mode-explicit percentile axis-label tests unchanged. 中文:合并 master(PR #639 百分位轴标签)。冲突解析:保留本分支共享的 派生指标 stub 辅助函数与 OSL / E2EL 默认模式测试,完整保留 #639 的 显式模式百分位轴标签测试。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
useChartData.stableChartDefinitionsinto an exported pure helperapplyAgenticPercentileToXLabel(label, pctlWord): it prefixes the percentile when the configured label has no leading statistic word, and still replaces an existing prefix (e.g. the TTFT override label "P90 Time To First Token (s)" → "P75 …") without double-prefixing.useChartData.test.ts): prefix on interactivity/e2e labels, p75 switch, replace-not-double on existing prefixes, Median/Mean replacement, no-op when already correct, mid-label statistic words untouched.ttft-x-axis-toggle.cy.ts): asserts "P90 Interactivity (tok/s/user)" and "P90 End-to-end Latency (s)" render in the chart SVG on agentic, "P75 Interactivity (tok/s/user)" after switching the percentile selector, no percentile prefix on the fixed-seq default scenario, and the same "P90 Interactivity (tok/s/user)" label with an?unofficialrun=overlay loaded.Why
p75_intvty/p90_intvty,p75_e2el/p90_e2el). The chart heading, the TTFT mode label, and the derived-mode labels already show the percentile, but the base Interactivity / E2E Latency axis titles rendered the raw config labels ("Interactivity (tok/s/user)") because the previous rewrite only replaced an existing leading percentile word — the base config labels have none, so nothing was added.isAgenticguard at the call site).?unofficialrun=overlays — the overlay path renders on the same base chart andChartDisplaypassesgraph.chartDefinition.x_labelfrom the samestableChartDefinitionsoutput, so one fix covers both; verified with a Cypress overlay assertion./zhpages reuse the English axis label for these modes (technical terms with units, same as the existing TTFT label behavior), so no zh-side change is needed.中文说明
useChartData.stableChartDefinitions中的标签改写逻辑提取为导出的纯函数applyAgenticPercentileToXLabel(label, pctlWord):配置标签没有统计词前缀时补上所选百分位;已有前缀(如 TTFT 覆盖标签 "P90 Time To First Token (s)" → "P75 …")时替换而不重复叠加。useChartData.test.ts)覆盖:interactivity/e2e 标签加前缀、切换到 p75、已有前缀时替换不重复、Median/Mean 替换、标签已正确时不变、标签中间的统计词不受影响。ttft-x-axis-toggle.cy.ts)断言:agentic 下图表 SVG 渲染 "P90 Interactivity (tok/s/user)" 与 "P90 End-to-end Latency (s)";切换百分位后显示 "P75 Interactivity (tok/s/user)";固定序列默认场景不带百分位前缀;加载?unofficialrun=叠加时同样显示带百分位的标签。p75_intvty/p90_intvty、p75_e2el/p90_e2el),图表标题、TTFT 模式及派生模式的标签均已显示百分位,唯独这两个基础模式的轴标题仍是原始配置标签——原有改写只替换已存在的前缀,而基础标签没有前缀,因此未生效。固定序列标签保持不变。叠加路径复用同一chartDefinition标签,一处修复同时覆盖官方与非官方运行;/zh页面沿用英文轴标签(含单位的技术术语,与现有 TTFT 标签行为一致),无需额外改动。🤖 Generated with Claude Code
Note
Low Risk
Display-only label logic gated to agentic sequences; fixed-seq and data plumbing are untouched.
Overview
Agentic Interactivity and E2E Latency x-axis titles now include the selected latency percentile (e.g. P90 Interactivity (tok/s/user)), matching the percentile fields actually plotted. Fixed-sequence scenarios are unchanged.
The prior inline label rewrite only replaced an existing leading statistic word, so base config labels without a prefix never got a percentile. That logic is extracted into
applyAgenticPercentileToXLabel, which prefixes when needed and still replaces Median/Mean/P90-style prefixes without doubling.Tests: Vitest covers the helper; Cypress asserts SVG axis text for agentic modes, p75 after percentile change, no prefix on fixed-seq default, and the same labels with unofficial-run overlays. Derived-metrics stubs were extended and wired earlier in suite setup to avoid loading skeletons when defaults fetch derived metrics.
Reviewed by Cursor Bugbot for commit 6cf6a8e. Bugbot is set up for automated code reviews on this repo. Configure here.