Repository navigation
DESKTOP: CPU Scheduler, Latch, Spinlock and Running Jobs grids show when their snapshot was collected; latch and spinlock trends say where their data starts (part of #4966) - #5029
Merged
Conversation
…d Running Jobs grids instead of a Snapshot at label (#4966)
erikdarlingdata
marked this pull request as ready for review
October 3, 2026 19:55
4 tasks done
erikdarlingdata
added a commit
that referenced
this pull request
Oct 4, 2026
… (part of #4966) (#5086) Lite's Latches & Spinlocks tab now says where the data starts on its two trend charts. Both charts draw a flat zero over an empty stretch, so a window that starts before the store's coverage looked like a quiet server. Two window relations, LatchStats and SpinlockStats, take their coverage from the latch_stats and spinlock_stats collectors' runs (the first sample of a class has no delta, so the oldest row would understate coverage). RefreshLatchSpinlockAsync then shows a "Showing since" note above each chart through the shared stored-window banner, as the Darling viewer does since #5029. For each chart, a test shows the note when coverage starts inside the window, and a quiet-start test shows no note when the window was covered but the first point comes late. Part of #4966
12 of 14 tasks
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.
Part of #4966.
Why
A newest-snapshot grid shows one collection, so it should name that collection. The viewer's other grids already do this with a last
Collectedcolumn (bare time in the display zone, to the second, sorted on the stored DateTime), and the Lite twin uses the same form. The Latch and Spinlock trend charts draw a flat zero over an empty stretch, so they also need a data-start note.What changes
Collectedcolumn bound toCollectionTimeLocal(display zone, to the second, in the viewer's current-culture display format) withSortMemberPath="CollectionTime".CpuSchedulerGridRow: the shared metric row plus the snapshot'sCollectionTimeon every row. It lives in the viewer, so the sharedPerformanceMonitor.Commontype that Lite also uses is unchanged.collection_time(a new last column and record field).RunningJobRowgainsCollectionTimeLocalover its existingCollectionTime.ForCollectorTable("latch_stats")/("spinlock_stats"). The load holdsViewerReadFanOut.Of(4)for the join, releases it, and runs the two probes under their ownOf(2), outside the join, so a probe that throws costs only the note.Limits
Test plan
Collectedcolumn toCollectionTimeinstead ofCollectionTimeLocalfailedViewerSnapshotCollectedColumnTests1 of 7 andViewerGridTimeColumnSortMemberTests3 of 95. GREEN after revert.Collected, bound toCollectionTimeLocal, sorted onCollectionTime; the CPU Scheduler load callsCpuSchedulerGridRow.Build;TheDisplayText_IsTheDisplayZonesWallTime_ToTheSecondpins the literal2026-10-03 14:05:09for a known UTC instant in UTC display mode, run under the invariant culture, for all four row types (it makes no claim about other cultures); every CPU Scheduler row carries the snapshot's time; the old label is gone from the xaml.ViewerGridTimeColumnSortMemberTestshas four new rows.ViewerSnapshotTimeLiveTestsis kept for the SQL time.comm -23againstdev-local-failing-tests.txtis empty.--no-incrementalbuild: 0 errors, 0 warnings.scrubcheck --diffexit 0; the public-text grep prints nothing.CHANGELOG
SECTION: Fixed
ENTRY: - Snapshot grids show when they were collected ([#5029]) - The desktop viewer's CPU Scheduler, Latch, Spinlock and Running Jobs grids now end in a
Collectedcolumn that shows when the snapshot was collected, and the Latch and Spinlock trend charts say where their data starts when it begins after the chosen range.REF: [#5029]: #5029