-
Notifications
You must be signed in to change notification settings - Fork 182
Description
Summary
Add 14 additional perfmon counters to sp_PressureDetector's dm_os_performance_counters IN clause. All are 65792 or 272696576 cntr_type — no code changes needed beyond extending the list. These are being added to PerformanceMonitor as well (erikdarlingdata/PerformanceMonitor#255).
Counters to Add
65792 (raw count):
- Version Store Size (KB)
- Free Space in tempdb (KB)
- Active Temp Tables
- Processes blocked
272696576 (cumulative/rate):
- Full Scans/sec
- Index Searches/sec
- Page Splits/sec
- Free list stalls/sec
- Workfiles Created/sec
- Worktables Created/sec
- Temp Tables Creation Rate
- Version Generation rate (KB/s)
- Version Cleanup rate (KB/s)
- Lock Timeouts/sec
Implementation
Just add to the IN clause at the existing dm_os_performance_counters query. No cntr_type branching, delta calculations, or output formatting changes needed — the existing logic handles both counter types correctly.
Note
The existing WHERE p.cntr_value > 0 filter will suppress gauge counters (65792) when their value is zero. This is acceptable — e.g., Processes blocked = 0 and Version Store Size = 0 aren't interesting to report.