Repository navigation
Scheduler issues read the utilization fields the event carries, flagged the way sp_HealthParser flags them (#4452) - #4456
Merged
erikdarlingdata merged 6 commits intoSep 27, 2026
Conversation
erikdarlingdata
marked this pull request as ready for review
September 27, 2026 01:11
erikdarlingdata
deleted the
fix/4452-scheduler-monitor-mirrors-sp-healthparser
branch
September 27, 2026 01:11
This was referenced Sep 27, 2026
Closed
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.
Refs #4452.
Why
The
get_health_parser_scheduler_issuestool (Darling and Lite) readscheduler_monitor_system_health_ring_buffer_recordedevents by the wrong column set: scheduler/CPU IDs and online/runnable/running state, none of which the event actually carries.sp_HealthParserflags this event by SQL CPU percent, other-process CPU percent, idle percent, memory utilization percent, page faults, and working-set delta — the tool never surfaced any of that, and its significance gate matched nothing real.What changes
PerformanceMonitor.Common/SystemHealthModels.cs:SchedulerIssueRecordnow carriesEventTime, SqlCpuUtilization, OtherProcessCpu, SystemIdle, MemoryUtilization, PageFaults, WorkingSetDeltaMb.PerformanceMonitor.Common/SystemHealthParser.cs:ParseSchedulerIssuereadsprocess_utilization/system_idle/memory_utilization/page_faults/working_set_deltaoff the event's owndata[@name]/valueelements. Working-set bytes convert to MB the same way the stored procedure does (divide by 1,048,576, round to 2 places, away from zero).PerformanceMonitor.Common/SystemHealthSignificance.cs:IsSignificantmirrorssp_HealthParser's own warning predicate — SQL CPU at or above 90, other-process CPU at or above 50, or memory utilization at or below 50. Null comparisons are false.DarlingMcpHealthParserTools.GetSchedulerIssues: description, served columns, and empty-result message updated to the new fields. Its tools/list budget line andMcpToolGuideHeads.HealthParsergate text updated to match, with the total-bytes ceiling raised by the measured amount (never guessed).McpHealthParserTools.GetSchedulerIssuesandLocalDataService.SystemEvents.cs: same field set; the description and gate text now match Darling's, keeping both SKUs byte-identical on the served head (checked byMcpToolGuideTests).ViewerDataService.SystemEvents.cs/ViewerServerTab.xaml(Darling) and the Lite twin: grid columns and the no-data message follow the new fields.deprecated/Dashboardproject has its own scheduler-issue model and never calls the sharedSystemHealthParser; confirmed by grep and left untouched.scheduler_monitor_high_sql_cpu.xml(SQL CPU 94, over the significant threshold) andscheduler_monitor_normal.xml(all three arms comfortably under threshold) replace the old hand-written fixture,call_stackremoved.scheduler_monitor_other_process_cpu.xmlandscheduler_monitor_low_memory.xmlare derived from the normal capture with only the relevant value changed, because no real capture crossed those two thresholds; each file's comment states which and why.Fixtures table
scheduler_monitor_high_sql_cpu.xmlscheduler_monitor_normal.xmlscheduler_monitor_other_process_cpu.xmlscheduler_monitor_low_memory.xmlTest plan
dotnet buildfor bothDarling.TestsandLite.Testswith-p:EnableWindowsTargeting=true: 0 errors on both.Darling.Tests.dll):McpToolsListBudgetTests,McpToolGuideTests,McpToolGuideHeadsHealthParserTests,SystemHealthParserTests,DarlingMcpHealthParserToolsSurfaceAndSqlTests,ViewerSystemEventsTests,DocCommentHygieneTests,ViewerServerTabCapabilityPinTests— all green (209 total, 0 failed).DarlingMcpHealthParserToolsLivePostgresTests.HealthParserTools_ReadPlantedEvents_AgainstDevPostgres), against a local Postgres/TimescaleDB container, plants the real high-CPU fixture throughsystem_health_eventsand callsDarlingMcpHealthParserTools.GetSchedulerIssuesdirectly (the tool's own call path, not a manual parse): passed, asserting the served JSON text carriessql_cpu_utilization:94,other_process_cpu:4,system_idle:2,memory_utilization:100.origin/dev@89831e931cb5b38e0ee1a7c58ffaa90c85aa3ff3at runtime:Darling.Tests Total: 1, Errors: 0, Failed: 1, Skipped: 0, Not Run: 0;System.Collections.Generic.KeyNotFoundException : The given key was not present in the dictionaryatJsonElement.GetProperty("server")inside the envelope assertion helper — because dev's significance check still keys off the oldStatus == "WARNING"text field, the high-CPU fixture (which carries nostatus) never qualifies as significant, soGetSchedulerIssuesanswers the healthy-empty envelope instead of the issues envelope and the test never reaches thesql_cpu_utilizationassertion. The live fact was cut down to just theDarlingMcpHealthParserToolsLivePostgresTestsclass and its one changed fixture (scheduler_monitor_high_sql_cpu.xml); the siblingDarlingMcpHealthParserToolsSurfaceAndSqlTestsclass and itsSchedulerIssueRecord-typed-property assertions were left out because those members don't exist on dev at all and porting them isn't in scope for this pin.process_utilizationforsystem_idleinParseSchedulerIssue, rebuilt, and re-ranSystemHealthParserTests. Four tests failed, e.g.SchedulerIssue_ShredsEveryColumn_HighSqlCpu:Assert.Equal() Failure: Expected: 94, Actual: 2. Reverted, rebuilt, re-ran: all 39 tests in that class green again.Lite.Testsbuild only (0 errors); it can't run in-process on macOS — CI decides it.CHANGELOG entry
SECTION: Changed
ENTRY:
REF:
[Scheduler issues read the utilization fields the event carries, flagged the way sp_HealthParser flags them (#4452) #4456]: Scheduler issues read the utilization fields the event carries, flagged the way sp_HealthParser flags them (#4452) #4456