Repository navigation
LITE: the surfaces that show the newest snapshot say when it was collected (part of #4966) - #5032
Merged
Merged
Conversation
…ected (part of #4966) The CPU Scheduler, Latch, Spinlock, Configuration and Running Jobs grids get a Collected column, and the Memory, Plan Cache and Session Stats summary strips end with Collected and the time, in the display zone to the second. The Session Stats read now also returns the newest collection's own time in the last bucket.
…umn as Lite (part of #4966) Adds CaptureTime/CaptureTimeLocal to the viewer's five config rows and reads, a last Collected column on each grid, and moves the Query Store pin to the new column order. Reshapes SnapshotCollectedText so the T-SQL member scan reads it whole, and fixes a Lite doc comment.
…r census (part of #4966)
4 tasks done
erikdarlingdata
marked this pull request as ready for review
October 3, 2026 18:09
erikdarlingdata
added a commit
that referenced
this pull request
Oct 3, 2026
…d (part of #4966) (#5028) The Darling viewer's PostgreSQL Extensions, Server Config, Buffer Usage and Predicate Stats grids end with a Collected column, the snapshot's time in the display zone to the second, sorting on the stored UTC instant. It is the last column in each grid, the same form as the viewer's other Collected columns and Lite's (#5032). Each grid binds a new PgDisplay row; Predicate Stats keeps the reader's row as Source, which the "Test an index" menu reads. The Replication Slots "Measured" and Index Bloat "Measured" and "Estimated" columns keep their headers and now show seconds, through the shared PgDisplay.SnapshotTime. A pin holds Collected as the last column of each grid, and the binding test checks that every binding of the four grids resolves on its display row. Part of #4966
erikdarlingdata
added a commit
that referenced
this pull request
Oct 3, 2026
…hen their snapshot was collected; latch and spinlock trends say where their data starts (part of #4966) (#5029) The Darling viewer's CPU Scheduler, Latch, Spinlock and Running Jobs grids now end in a Collected column that shows when the snapshot was collected, in the display zone to the second and sorting on the stored time, the form Lite's twin grids use (#5032). CPU Scheduler gets a viewer-only row wrapper, CpuSchedulerGridRow.Build(snapshot), so every metric row carries the snapshot's time; the latch and spinlock snapshot reads gain collection_time as their last column. The Latch and Spinlock trend charts draw a flat zero before their data starts, so each now says where its collector's coverage starts, floored on latch_stats and spinlock_stats. Their probes run after the reads' join under their own two-wide declaration and are awaited through the catching helper, so a probe that fails costs only its note. The Collected text follows the viewer's display-time format and culture, like its other time columns. Part of #4966
erikdarlingdata
added a commit
that referenced
this pull request
Oct 3, 2026
…their snapshot was collected (part of #4966) (#5038) The Darling viewer's Memory, Plan Cache and Session Stats summary strips now end with "Collected" and the time their snapshot was collected, in the display zone to the second, so a strip drawn from the newest snapshot no longer reads as current when it isn't. The wording and placement match Lite's strips (#5032), and a strip with no snapshot keeps its own empty marker. The Plan Cache summary read gains MAX(collection_time) over the same newest-snapshot rows it sums. The Session buckets gain their newest collection time, taken from the same row as Top Application and Top Host; the strip's Databases value is still the bucket average. A live test seeds two collections in one bucket and fails if the strip shows the bucket start instead of the newest collection. 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.
What changes
Lite's tabs that show the newest snapshot now say when it was collected. A reader can tell a stale snapshot from a fresh one. The time is in the display zone, to the second, worded the way the Automatic Tuning grid words its Collected column.
Collectedcolumn. It comes last and sorts by the stored time. The grids are CPU Scheduler, the Latch and Spinlock grids on Latches & Spinlocks, the five Configuration grids (Server, Database, Database Scoped, Query Store Health, Trace Flags) and Running Jobs. The text is worded per row, so a grid whose rows come from different snapshots shows each row's own time.Collectedand the time. The strips are the Memory Overview strip, the Plan Cache strip and the Session Stats strip. With no snapshot the strip shows its own empty marker (--, andN/Aon Session Stats) and no time.CollectionTimeLocal. The five configuration rows getCaptureTimeLocal, because their stored time iscapture_time. A newCpuSchedulerGridRowcarries the snapshot's time beside each metric row.Later fixes
Collectedcolumn as Lite, worded in the display zone to the second and sorted by the stored capture time. This also turns the red Query Store pin green, and the pin now expects the new last column.Collecteddoc now says the data is captured hourly, not on connect.Test plan
Grid columns. Nine rows are added to the existing grid-time table in
GridTimeColumnSortMemberTests. Each new column must exist, bind the text member and sort by a storedDateTimeon its row type. RED with the nine XAML columns taken out: 9 table cases fail, plusTheScan_ReadsEveryPinnedColumnAsATime(10 in all).Strips.
ASummaryStrip_EndsWithItsSnapshotsCollectedTime(3 cases) checks that each strip ends with aCollectedlabel and a named value. Four code pins check that the code fills each surface from the snapshot's own time. RED with the three strip text blocks taken out: 3 of 3 fail.Text. The new
SnapshotCollectedTimeTestscheck three things for all nine row types. The text is the stored time in the display zone to the second, in Server and UTC modes. The second pass of the autumn repeated hour keeps its-05:00suffix. Two rows with different times each show their own.Strip and CPU Scheduler rows. The strip text is the time in the given zone, and the empty marker with no snapshot. The CPU Scheduler rows each carry the snapshot's time, and there are no rows (so no time) without a snapshot.
Read. A live DuckDB test in
LiteCpuSessionsPlanCacheTrendBucketingTests: a bucket holding two collections returns the newer collection's time, not the bucket start.Totals. 550 passed, 0 failed, 0 warnings. Classes run:
SnapshotCollectedTimeTests,GridTimeColumnSortMemberTests,LiteCpuSessionsPlanCacheTrendBucket*,HistoryGridZoneTests,DisplayZoneTextFrameTests,RepoFileAdoption*,DocCommentHygiene*,CommentFilterAdoption*, and every class whose name has CpuScheduler, SessionStats, PlanCache, ServerTab, AzureSqlDatabase, ServerTimeHelper, Config or StoredServerClock.Not run against the old code. The text, strip-text, CPU Scheduler row and live Session Stats tests call members that do not exist before this change. They cannot compile there, so their RED is "does not compile" and I did not run them red.
Not run: the full suite. No app was started, so nobody has looked at the new columns or strips on screen.
Later fixes: built Darling.Tests and Lite.Tests on macOS, 0 errors. Not run here: Darling.Tests cannot start on macOS (needs the WindowsDesktop runtime) and Lite.Tests never runs on this Mac. The new
ViewerConfigGridCollectedColumnTests(5 grid pins, 1 row-text test), the updated Query Store pin and the member-scan test are proven by CI only; their REDs (viewer without the column, helper with the property pattern) are CI-only too.Notes
Collectedafter the recommendation hint, as the last item. In a narrow window the strip can clip at the right edge. I did not change its layout.CHANGELOG
No entry in this PR. The release owner adds it under [Unreleased].