fix(dashboard): drop -1 not-measured sentinels from perf trends#138
Merged
Conversation
The scale-sweep harness writes -1 for any measurement it could not take (e.g. fps/avgTickMs/driftPx on large ULTRA graphs). Those sentinels were finite, so scaleSweepMetrics charted them as real data points, polluting the trend lines. Treat negative scale-sweep values as not-measured. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🧪 Comprehensive Test Suite
Full-stack smoke gate runs in the CI workflow. |
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
scaleSweepMetricswas charting the scale-sweep harness's-1"not measured" sentinels (e.g. fps/avgTickMs/driftPx on large ULTRA graphs that skip those measurements) as real trend points, since-1is finite. This corrupted the dashboard's perf trend lines (driftPx, idleFps, avgTickMs series showed spurious-1/0dips).Fix
Treat negative scale-sweep values as not-measured → emit
null→ excluded from trends. All these metrics (fps/ms/px/count) are legitimately non-negative, so the guard is safe.Test
Added a unit test asserting
-1sentinels are dropped while real values (loadMs, settleMs=0) pass through.node --test tests/lib/dashboard/dashboard.test.mjs→ 33/33 green.Dashboard-only data-quality change; no data/graph/deletion paths touched.
🤖 Generated with Claude Code