Summary
The Overview tab's "% CPU" chart plots only sqlserver_cpu_utilization, but CPU alerts evaluate combined CPU (sqlserver_cpu_utilization + other_process_cpu_utilization). This causes user-facing confusion when an alert fires at, say, 95% but the Overview chart never shows above ~60%.
The "CPU Utilization" sub-tab correctly stacks both series, so the data is visible there — just not on the landing/Overview chart users glance at first.
Reported by a user as erikdarlingdata/PerformanceStudio#349 (filed against the wrong repo — actual code lives here).
Repro
- Run a workload where SQL Server CPU is ~60% and other processes consume ~30%.
- Set CPU alert threshold to 80%.
- Alert fires reporting ~90% — correct, that's combined.
- Open Overview tab → "% CPU" chart never exceeds ~60% → looks like the alert is bogus.
- Open "CPU Utilization" sub-tab → stacked chart shows the true combined total → matches the alert.
Code pointers (from exploration)
- Alert evaluation uses combined CPU —
Lite/Analysis/DuckDbFactCollector.cs ~lines 414–472 aggregates both series; Lite/Services/LocalDataService.Overview.cs ~line 190 colors CPU red on the alert metric.
- Overview chart plots SQL-only —
Dashboard/Views/ServerTab.Charts.cs ~line 475:
dataList.Select(d => (double)d.SqlServerCpu)
The query in Dashboard/Services/DatabaseService.ResourceMetrics.cs ~lines 230–289 already retrieves total_cpu_utilization, so the data is available — the binding just isn't using it.
- Daily summary "High CPU Events" in
Dashboard/Services/DatabaseService.Overview.cs ~lines 108–112 and ~136 also use sqlserver_cpu_utilization >= 80/90 thresholds (SQL-only). These should probably switch to total_cpu_utilization for consistency with the alert too.
Proposed fix
- Overview chart: plot total CPU (or stack both series like the CPU Utilization sub-tab does — Erik's call which presentation is better).
- High-CPU event counters in DailySummary: switch to
total_cpu_utilization so they match what triggered the alerts.
- Verify no other UI uses SQL-only CPU in a way that implies "system CPU."
Once that ships, PerformanceStudio#349 can be closed.
Summary
The Overview tab's "% CPU" chart plots only
sqlserver_cpu_utilization, but CPU alerts evaluate combined CPU (sqlserver_cpu_utilization + other_process_cpu_utilization). This causes user-facing confusion when an alert fires at, say, 95% but the Overview chart never shows above ~60%.The "CPU Utilization" sub-tab correctly stacks both series, so the data is visible there — just not on the landing/Overview chart users glance at first.
Reported by a user as erikdarlingdata/PerformanceStudio#349 (filed against the wrong repo — actual code lives here).
Repro
Code pointers (from exploration)
Lite/Analysis/DuckDbFactCollector.cs~lines 414–472 aggregates both series;Lite/Services/LocalDataService.Overview.cs~line 190 colors CPU red on the alert metric.Dashboard/Views/ServerTab.Charts.cs~line 475:Dashboard/Services/DatabaseService.ResourceMetrics.cs~lines 230–289 already retrievestotal_cpu_utilization, so the data is available — the binding just isn't using it.Dashboard/Services/DatabaseService.Overview.cs~lines 108–112 and ~136 also usesqlserver_cpu_utilization >= 80/90thresholds (SQL-only). These should probably switch tototal_cpu_utilizationfor consistency with the alert too.Proposed fix
total_cpu_utilizationso they match what triggered the alerts.Once that ships, PerformanceStudio#349 can be closed.