Skip to content

fix(sample): read the demo's p95 tile off the demo's latency curve - #80

Merged
htcom-code merged 1 commit into
mainfrom
fix/sample-p95-agreement
Oct 12, 2026
Merged

htcom-code merged 1 commit into
mainfrom
fix/sample-p95-agreement

Conversation

@htcom-code

Copy link
Copy Markdown
Owner

Follow-up to #79 (#78).

Why

In sample mode the p95 tile showed 88 ms next to a latency curve ending in the 40s. Both values are generated. Since #79, though, a real platform always shows the tile and the chart's newest point as the same number. A demo where they disagree misrepresents what the two panels mean.

What

  • mockSummary now takes the sample latency series. It reports the series' newest point as p95LatencyMs. It reports the change from the point one windowMs earlier as p95DeltaMs, which is the comparison a platform makes.
  • Every other sample KPI field is unchanged.

Verification

  • New scenario: on a cold start with no platform, the demo's p95 tile equals the chart's newest point, and the trend equals the difference from the point one window back. With the fixed 88 put back, this test fails.
  • Browser, sample mode on vite: the tile reads 45ms, the newest point sits at the 45 ms height (cy=53 on the 0–60 axis), and the sub-line reads 4ms · p99 210ms.
  • Full suite run serially: 238/238. Lint is clean (the same 7 warnings as main), and the build passes.

In sample mode the p95 tile printed 88 ms beside a curve ending in the
40s. Both are generated, but on a real platform the two are one number
since #79, and a demo that shows them disagreeing teaches the wrong
thing about the screen.

- mockSummary takes the sample series and reports its newest point as
  the p95, and the change from the point one window back as the trend
- A scenario pins it: the cold-start demo's tile equals the chart's
  newest point. Put the fixed 88 back and it fails

Tags: #sample #honesty
Co-Authored-By: htjulia <htjulia1@gmail.com>
@htcom-code
htcom-code merged commit b8be2d5 into main Oct 12, 2026
4 checks passed
@htcom-code
htcom-code deleted the fix/sample-p95-agreement branch October 12, 2026 05:59
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