Skip to content

DESKTOP: the Memory, Plan Cache and Session summary strips show when their snapshot was collected (part of #4966) - #5038

Merged
erikdarlingdata merged 3 commits into
devfrom
feature/4966-desktop-snapshot-strips
Oct 3, 2026
Merged

erikdarlingdata merged 3 commits into
devfrom
feature/4966-desktop-snapshot-strips

Conversation

@erikdarlingdata

@erikdarlingdata erikdarlingdata commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Part of #4966.

Why

A summary strip that draws the newest snapshot gave no sign of when that snapshot was taken. The Memory strip reads the newest snapshot ever, which can fall outside the chart window under it. The Plan Cache and Session strips read the newest point in the window. A reader couldn't tell stale from current.

What changes

  • Memory gets a dim "Collected" tile like its neighbors. Plan Cache and Session get an inline dim "Collected:" label and value at the end of the strip.
  • The text is the snapshot's collection time in the display zone, to the second (HistoryTime.SnapshotCollected, which wraps the existing CollectionLocal). Empty value: -- for Memory and Plan Cache, N/A for Session.
  • PlanCacheSummarySql now also returns MAX(collection_time), and PlanCacheSummary carries it as CollectionTime.
  • SessionStatsSql returns the newest collection inside each bucket (latest_collection_time), and SessionStatsPoint.LatestCollectionTime carries it. The strip shows the last bucket's value, the same collection Top Application and Top Host come from, not the bucket's grid time.

Limits

Test plan

  • ViewerSnapshotStripCollectedTests: 5 cases (text, zone, empty marker, xaml elements, load wiring, SQL carries the time). Total 5, 0 failed.
  • ViewerSnapshotStripCollectedLiveTests: seeds two Plan Cache collections and two Session collections inside ONE 1-minute bucket at off-minute seconds (+10 s, +50 s). Asserts the Plan Cache summary time, that the Session LatestCollectionTime is the newer collection, and that it differs from the bucket time. Also an empty window gives null. Total 1, 0 failed. RED: projecting bucket_start as latest_collection_time fails it. Carries the #1776 own-store marker.
  • RED: the mutations (Memory render passes null, Plan Cache element renamed, SQL column renamed) each failed the matching pin.
  • Full suite: see REPORT.
  • CI-only: nothing here builds WPF objects. The xaml and wiring pins are source-text pins and run on this Mac.

CHANGELOG

SECTION: Fixed
ENTRY: - Viewer summary strips show when their snapshot was collected ([#5038]) - The Memory, Plan Cache and Session Stats summary strips now show 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.
REF: [#5038]: #5038

@erikdarlingdata
erikdarlingdata marked this pull request as ready for review October 3, 2026 19:56
@erikdarlingdata
erikdarlingdata merged commit d84429b into dev Oct 3, 2026
19 of 20 checks passed
@erikdarlingdata
erikdarlingdata deleted the feature/4966-desktop-snapshot-strips branch October 3, 2026 20:13
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