Skip to content

LITE: the surfaces that show the newest snapshot say when it was collected (part of #4966) - #5032

Merged
erikdarlingdata merged 3 commits into
devfrom
feature/4966-desktop8c-lite
Oct 3, 2026
Merged

erikdarlingdata merged 3 commits into
devfrom
feature/4966-desktop8c-lite

Conversation

@erikdarlingdata

@erikdarlingdata erikdarlingdata commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

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.

  • Grids get a Collected column. 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.
  • Summary strips end with Collected and 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 (--, and N/A on Session Stats) and no time.
  • The Session Stats read also returns the newest collection's own time in the last bucket. The strip's Top Application and Top Host come from that collection. The trend point's time is the bucket start (or the bucket's first collection), so it would show the wrong time. This is the only read that changed. The CPU Scheduler, Memory and Plan Cache reads already returned the snapshot's time, and the latch, spinlock, configuration and running-jobs rows already carried it.
  • New row members. The latch, spinlock and running-jobs rows get CollectionTimeLocal. The five configuration rows get CaptureTimeLocal, because their stored time is capture_time. A new CpuSchedulerGridRow carries the snapshot's time beside each metric row.

Later fixes

  • The Darling viewer's five Configuration grids (Server, Database, Database Scoped, Query Store Health, Trace Flags) now end with the same Collected column 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.
  • The Lite strip-time helper is reshaped so the T-SQL member scan reads it whole (no new known-truncated entry).
  • The Lite Query Store Health Collected doc now says the data is captured hourly, not on connect.
  • The viewer's grid-time sort census now lists the five new Collected columns, so each is checked to sort by its stored time, not its text.

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 stored DateTime on its row type. RED with the nine XAML columns taken out: 9 table cases fail, plus TheScan_ReadsEveryPinnedColumnAsATime (10 in all).

  • Strips. ASummaryStrip_EndsWithItsSnapshotsCollectedTime (3 cases) checks that each strip ends with a Collected label 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 SnapshotCollectedTimeTests check 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:00 suffix. 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

  • The CPU Scheduler grid is a metric and value list with column sorting switched off on purpose, because its row order is the point. Every row shows the same time. The new column still names its stored time as its sort member, which the grid-time table requires. Header clicks stay off there.
  • The Plan Cache strip puts Collected after 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.
  • The shared CPU Scheduler snapshot interface leaves the time out on purpose, because each app words its own time. The shared code is untouched, and Lite wraps the shared metric rows instead. The Darling viewer half is on its own branch.
  • A Trace Flags capture with every flag off stores no rows. That grid is empty and shows no time.

CHANGELOG

No entry in this PR. The release owner adds it under [Unreleased].

SECTION: Added
ENTRY:
- **Lite's tabs that show the newest snapshot now say when it was collected** ([#5032]) - The CPU Scheduler, Latches & Spinlocks, Configuration and Running Jobs grids have a Collected column in Lite, and the Darling viewer's five Configuration grids have the same column, and the Memory, Plan Cache and Session Stats summary strips end with Collected and the time, in the display zone to the second, so a stale snapshot no longer looks like a fresh one. The Session Stats time is the newest collection in the last bucket, which is where its Top Application and Top Host come from.
REF:
[#5032]: https://github.com/erikdarlingdata/PerformanceMonitor/pull/5032

…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.
@erikdarlingdata
erikdarlingdata marked this pull request as ready for review October 3, 2026 18:09
@erikdarlingdata
erikdarlingdata merged commit 69060db into dev Oct 3, 2026
21 of 22 checks passed
@erikdarlingdata
erikdarlingdata deleted the feature/4966-desktop8c-lite branch October 3, 2026 18:17
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant