fix(log-viewer): show governor usage only where the log measured it - #1071
Merged
lcottercertinia merged 3 commits intoSep 18, 2026
Merged
Conversation
The charts drew a straight line between readings, so usage read at instants the log never measured. Each chart now holds a reading until the next one, runs on the Timeline's own timescale, and leaves the spans the log recorded nothing in unfilled - matching the governor limits strip it shares its figures with.
Capture the inspector on its own: the Analysis tab with a row selected, so Findings names it, which no other tab's panel can do. An area drag round the panel, not the whole window, so the shot no longer repeats the Database tab.
Crop to the panel on the Analysis tab, reading the whole log. Findings and Self time spread are that tab's own sections, and no whole-window shot shows them large enough to read.
lcottercertinia
approved these changes
Sep 18, 2026
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.
📝 PR Overview
The Inspector's Governor usage over time charts and the Timeline's governor strip read the same series, but drew it differently. The charts ran a straight line between two readings, which puts usage at instants the log never measured — plainest on CPU, whose only readings are the
LIMIT_USAGE_FOR_NSandLIMIT_USAGElines, so the invented climb between them spans most of the chart.Each chart now steps like the strip: a reading stands until the next one. Two smaller disagreements go with it — the charts measured x against
duration.totalwhile the Timeline runs0..exitStamp, so every reading sat right of where the Timeline drew it and a click seeked short of the instant picked; and the spans the log recorded nothing in, blanked on the strip in 1.22.0, were still filled straight across here.🛠️ Changes made
exitStamp, the Timeline's own domain, so a reading sits where the Timeline draws it and click-to-seek lands on itgapson the shared series rather than adding them in the Timeline, so the charts leave unrecorded spans unfilled; the line still carries across one, because a governor total cannot fallrecordedSegmentEndbetween the strip and the charts, so the gap rule has one statementinspector.png: the Analysis tab with a row selected, cropped to the panel, so the shot shows the Inspector on its own instead of repeating the Database tab🧩 Type of change (check all applicable)
📷 Screenshots / gifs / video [optional]
The 1.22 screenshot set is refreshed in the second commit. The chart change itself reads best live: open a log, Timeline tab, nothing selected, and compare the CPU chart against the strip below the flame chart.
🔗 Related Issues
N/A
✅ Tests added?
pnpm lintandpnpm exec jest --selectProjects log-viewer(2092 tests). New coverage: the step path, one fill shape per recorded stretch against an unbroken line, and the series carrying the log's gaps. TheGovernorTrendsfixture now setsexitStampapart fromduration.total, so reading the wrong one fails.📚 Docs updated?
Anything else we need to know? [optional]
Two commits: the fix, then the screenshot work. Start at
governorTrendData.ts(pointAt) andGovernorTrends.ts(trendPaths) — the rest follows from those.