Skip to content

Web: the event grids' data-start note uses the earliest event shown (part of #4966) - #5197

Merged
erikdarlingdata merged 7 commits into
devfrom
fix/4966-web-event-time
Oct 5, 2026
Merged

erikdarlingdata merged 7 commits into
devfrom
fix/4966-web-event-time

Conversation

@erikdarlingdata

@erikdarlingdata erikdarlingdata commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

What users see change

  • Blocked Process Reports, Long Query Completions, Memory Pressure Events and Default Trace now show a "partial window" note on the web server page when the data starts after the window starts.
  • These grids list events by their own time, and a first collection stores a server's earlier event history. The note now names the earlier of the coverage start and the earliest event shown, as the desktop viewer does. History that reaches the window start shows no note.
  • A capped Blocked Process Reports or Default Trace page names its oldest shown event, without asking the store.
  • The Memory Pressure grid now draws the note on a data answer, not only on an empty one.
  • Long Query Completions keeps the coverage-plus-event rule on a full answer. Its page is the slowest runs, so on a truncated page the oldest row shown says nothing about how far back the read reached: the note then uses the coverage start alone.

Changes

  • ViewerEventDataStart moved from the desktop viewer to PerformanceMonitor.Darling.Storage (the web service does not reference the viewer), so the web and the viewer share one rule. Its code is unchanged; only its namespace and the using lines that name it moved.
  • The capped-list rule is table-driven (CappedByRead); collection log and PostgreSQL config changes behave as before.
  • memory_pressure_events gets its own probe source.

Test plan

  • Live (scratch store): history before coverage names the earliest event; history reaching the window start gives no note, for all four reads.
  • No store: capped Default Trace page names its oldest event_time with no store call; Long Query Completions with truncated:true still goes to the coverage probe.
  • Page harness: Memory Pressure grid draws the note on a data answer.
  • Existing WebDataStartNote* tests pass; two adjusted: an unlisted-read example that is now listed, and four source-scan rows for the new reads.
  • Darling.Tests builds with 0 warnings.
  • Every Darling.Tests class that names a changed file, against a live PostgreSQL store (90 classes), and every class that reads repository source (748 classes): every failure is one that fails only on macOS.
  • After the first review: all six capped reads share one window anchor (CappedByRead), a test pins that set, a truncated Long Query Completions page reads the coverage start only, and a capped Blocked Process Reports page names its oldest event without asking the store.
  • On Windows 11: the seven desktop viewer classes that use the moved ViewerEventDataStart, plus WebDataStartNoteEventReadsTests and WebDataStartNoteTests: 152 tests, 0 failed (49 skipped there: live cases that need a PostgreSQL store, run on the Mac).

CHANGELOG

SECTION: Fixed
ENTRY: - The web page's event grids say where their data starts ([#5197]) - Blocked Process Reports, Long Query Completions, Memory Pressure Events and Default Trace now show a partial-window note when the data starts after the window starts, naming the earlier of the collector's coverage and the earliest event shown, as the desktop viewer does. A capped page names its oldest event shown.
REF: [#5197]: #5197

Part of #4966

Move ViewerEventDataStart to the Storage project so the web note and the desktop viewer share one rule. The web note follows it for blocked process reports, long query completions, memory pressure events and the Default Trace, and its capped rule is now table-driven.
… plainly, and skip a ranked page's event when it is cut (#4966)
# Conflicts:
#	Darling/PerformanceMonitor.Darling.Service/WebDataStartNote.cs
@erikdarlingdata erikdarlingdata added the merge-train In a merge train: its CI ran on the train PR label Oct 5, 2026
@erikdarlingdata
erikdarlingdata marked this pull request as ready for review October 5, 2026 09:18
@erikdarlingdata
erikdarlingdata merged commit 7aca883 into dev Oct 5, 2026
14 of 18 checks passed
@erikdarlingdata
erikdarlingdata deleted the fix/4966-web-event-time branch October 5, 2026 09:19
erikdarlingdata added a commit that referenced this pull request Oct 5, 2026
…ls say where their data starts (part of #4966) (#5222)

The Darling web server page's partial-window note now covers fourteen more event reads, on data and empty answers alike: the nine get_health_parser_* reads (System Events), get_blocking, get_deadlocks and get_deadlock_detail, and PostgreSQL's get_pg_deadlocks and get_pg_log_events. An empty System Events panel over a window the store never covered used to show nothing, because the tool's own keys sat under hints, which the page does not read.

These are event lists, so the note follows the event-time rule from #5197: the earlier of the store's coverage start and the earliest event shown (the desktop viewer's ViewerEventDataStart.Of). A page cut by its row cap names its oldest row shown without asking the store (RowStatusByRead and the per-read oldest field). get_blocking is fed by the blocked process reports and the DMV blocking snapshots, so its probe asks both and the earlier start wins (CompositeSourcesByRead), as the MCP tool and the desktop viewer do. empty, no_deadlocks and no_events are admitted as "looked and found nothing"; unavailable with source_observed false is not.

Tests: a theory over the nine system-health reads (capped, uncapped, empty, unavailable), a capped page for each of the other five, the capped set pinned at twenty reads, source scans tying each listed read to its tool, and live cases with event times stamped apart from collection_time, including get_blocking with rows in only one of its two tables.

Part of #4966
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-train In a merge train: its CI ran on the train PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant