feat(timeline): granular governor-limit tracking with stable tooltip#851
Merged
lcottercertinia merged 3 commits intoJul 10, 2026
Merged
Conversation
Feed the limit strip with per-event usage so the line rises as usage happens, not only at code-unit boundaries; cumulative snapshots stay corrective. - Fold detailed events (SOQL/DML/SOSL/callout/heap + LIMIT_USAGE/flow reports) into a dense per-metric series in governor-timeline.ts; cumulative LIMIT_USAGE_FOR_NS snapshots correct the running total via a max floor - Walk the full event tree (not just top-level) and read pre-parsed .self counters + heap Bytes so nested usage is captured - Fix authoritative "out of" limit per metric (max cumulative snapshot, else default) so totals never jump (e.g. heap 6MB↔12MB); show strip whenever any usage exists - Coalesce high-frequency deltas to bound point count on massive logs (~36k→55 on a 5.9MB log); tooltip shows tracked count as ghost text only when it undercounts the snapshot - Consolidate limit-line parsing into limits.ts shared by the cumulative and flow/LIMIT_USAGE paths - Always resize on strip visibility change so hiding it reclaims space and keeps the root frame on-screen
- sort tooltip rows by each metric's global peak (not the value at the cursor) so rows hold a fixed slot instead of reshuffling as the pointer moves - always render the (used / limit) value, even at 0% before a metric's first observation, so the limit/headroom is always visible; carry the fixed per-series limit on the classified metric - extract the ApexLog → HeatStripTimeSeries transform out of ApexLogTimeline into apex-limit-series.ts, keeping metric-strip/ Apex-agnostic
lcottercertinia
approved these changes
Jul 10, 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
Feeds the timeline metric strip with per-event governor-limit usage so each limit line rises as usage
actually happens (not only at code-unit boundaries), and makes the hover tooltip stable and easier to
scan. Gives a far more accurate, readable picture of where a transaction approaches its limits.
🛠️ Changes made
LIMIT_USAGE/flow reports) into a dense per-metricseries in
governor-timeline.ts; cumulativeLIMIT_USAGE_FOR_NSsnapshots stay corrective via a maxfloor so monotonic counters never dip.
mid-log (e.g. heap 6MB↔12MB); coalesce high-frequency deltas to bound point count on massive logs
(~36k→55 on a 5.9MB log).
fixed slot rather than reshuffling as the pointer moves.
used / limitvalue — even at 0% before a metric's first observation — so thelimit/headroom is always visible; the fixed per-series limit is carried on the classified metric.
ApexLog → HeatStripTimeSeriestransform out ofApexLogTimelineintoapex-limit-series.ts, keepingmetric-strip/Apex-agnostic; consolidate limit-line parsing intolimits.ts.🧩 Type of change (check all applicable)
📷 Screenshots / gifs / video [optional]
No new screenshots — behaviour change to the existing metric-strip lines and hover tooltip.
🔗 Related Issues
closes #827
✅ Tests added?
governor-timeline.test.ts,MetricStripTooltipRenderer.test.ts,apex-log-parser/__tests__/GranularLimits.test.ts.📚 Docs updated?
🧪badge — seeRELEASING.md)
Anything else we need to know? [optional]
Reviewer guidance: the core of the new behaviour is the fold in
governor-timeline.ts(delta vsabsolute observations, max-floor correction, delta coalescing).
apex-limit-series.tsis a straightextraction from
ApexLogTimeline— no logic change there. Tooltip ordering/value changes are isolatedto
MetricStripTooltipRenderer.ts+ a newlimitfield threaded throughMetricTierClassifier.ts.