Skip to content

LITE: the Blocking Trends, Blocking Stats and Lock Wait Trend charts say where their data starts (part of #4966) - #5096

Merged
erikdarlingdata merged 3 commits into
devfrom
fix/4966-lite-8b-blocking-charts
Oct 4, 2026
Merged

erikdarlingdata merged 3 commits into
devfrom
fix/4966-lite-8b-blocking-charts

Conversation

@erikdarlingdata

@erikdarlingdata erikdarlingdata commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

Part of #4966. On Lite's Blocking tab, five charts draw zeros across the chosen window even where the store holds no data yet: the Trends sub-tab's Lock Wait, Blocking and Deadlock trends, and the two chart pairs on Blocking Stats (they pad their ends with zero). An empty stretch then reads as "nothing happened". Each now shows the same "Showing since" note Lite's grids carry, worded and placed as the Darling desktop viewer's #5030 does.

Chart Note Probes
Lock Wait Trend LockWaitTrendTruncationBanner QueryWindowRelation.WaitStats (new, the wait_stats collector)
Blocking Trend BlockingTrendTruncationBanner BlockedProcessReports (which also counts the DMV blocking snapshots, for a server with no blocked process threshold)
Deadlock Trend DeadlockTrendTruncationBanner Deadlocks
Blocking Stats, blocking pair BlockingStatsBlockingTruncationBanner BlockedProcessReports
Blocking Stats, deadlock pair BlockingStatsDeadlockTruncationBanner Deadlocks

What users see change

  • When the store's data for a chart begins after the start of the chosen window, the chart shows a "Showing since" note with that time above it, in the time zone the chart's axis uses.
  • A window of 90 minutes or less, or one the store fully covers, shows no note.
  • If the data-start check fails, only the note is lost; the chart still draws.

What changes

  • Lite/Controls/ServerTab.BlockingChartsDataStart.cs (new): RefreshBlockingTrendsBannersAsync and RefreshBlockingStatsBannersAsync. They run after the charts are drawn, over the same UTC window the reads took, through the shared RefreshWindowTruncatedBannerAsync step, so the probe, the 90-minute rule, the picker zone and the failed-probe rule are the ones every other Lite note uses.
  • The Blocking and Deadlock series name the earlier of the coverage start and the earliest non-zero point drawn (EarlierOfFloorAndRowShown); a zero bucket is the chart's baseline, not an event.
  • Lite/Controls/ServerTab.Refresh.cs: the two refresh paths call the steps.
  • Lite/Controls/ServerTab.xaml: the five collapsed notes, one above each chart or chart pair.
  • Lite/Services/LocalDataService.QueryWindowFloor.cs: the WaitStats relation (view v_wait_stats, collector wait_stats), appended after LITE: the latch and spinlock trend charts say where their data starts (part of #4966) #5086's LatchStats and SpinlockStats.

Test plan

  • Lite.Tests/BlockingChartsDataStartTests.cs (new, 19 tests: 14 behaviour and source-pin tests plus a 5-row theory): for each of the five charts, a notice test (the data starts inside the window, so the note names the coverage start) and a quiet-start test (the window is covered but its first point is late, so there is no note); plus a point drawn before the coverage start is what the note names, zero buckets are not points drawn, every refresh path runs the note steps and the XAML carries the five notes, and the WaitStats relation names its view and collector.
  • RED: the first 14 tests stayed green with the five notes turned off (both Refresh*BannersAsync bodies replaced by await Task.CompletedTask), so a pin theory, BlockingBannerSteps_CallEachNote_WithItsRelation, was added: one row per note, asserting the step body holds the exact call. On the notes-off branch the class gave Total: 19, Failed: 5 (all five new rows). On this branch: Total: 19, Failed: 0.
  • GREEN, on the merged tree (Windows 11, as the logged-in user): BlockingChartsDataStartTests 19, 0 failed; DataStartBannerLatchSpinlockTests 7/0; DataStartBannerBlockingEventsTests 14/0; DataStartBannerSurfaceTests 94/0; DataStartBannerTests 13/0.
  • Full Lite.Tests on the merged tree (Windows 11, as the logged-in user): Total 8025, 0 errors, 0 failed, 0 skipped (the 8,003 baseline, LITE: the latch and spinlock trend charts say where their data starts (part of #4966) #5086's 7 and this change's 14, plus one theory row The Storage Growth index drill shows when its snapshot was collected (#5070) #5079 added to dev's GridTimeColumnSortMemberTests after the baseline was taken).
  • Darling.Tests on macOS (no store): Total 22324; every failure is one that already fails on this machine on dev (the WPF-only and Windows-only tests), so none is new. --no-incremental builds of Darling.Tests and Lite.Tests: 0 warnings, 0 errors.

Limits

  • The Lock Wait Trend is a rate series over wait_stats deltas, so it names its coverage start alone; the Blocking and Deadlock charts are event counts and name the earlier of coverage and the first event drawn.
  • The Overview tab's blocking bars come in a separate change.

CHANGELOG

SECTION: Fixed
ENTRY: - Lite's Blocking Trends, Blocking Stats and Lock Wait Trend charts say where their data starts ([#5096]) - when the store's data begins inside the chosen window, the charts show a "Showing since" note instead of drawing zeros as if nothing had happened.
REF: [#5096]: #5096

@erikdarlingdata
erikdarlingdata marked this pull request as ready for review October 4, 2026 18:16
@erikdarlingdata
erikdarlingdata merged commit cb3bd8c into dev Oct 4, 2026
20 of 22 checks passed
@erikdarlingdata
erikdarlingdata deleted the fix/4966-lite-8b-blocking-charts branch October 4, 2026 18:18
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