Commit d45a6a6
Wire wait stats config as single source of truth (#215 part 2)
- Trim WaitStats.json from 52 to 44 entries — drop server-level / instance-
level waits (THREADPOOL, BACKUPIO, BACKUPBUFFER, HADR_SYNC_COMMIT,
DBMIRROR_DBM_EVENT, SQLTRACE_BUFFER_FLUSH) and connection-setup waits
(PREEMPTIVE_OS_AUTHENTICATIONOPS, PREEMPTIVE_OS_LOOKUPACCOUNTSID) that
don't appear in plan XML's <WaitStats> element.
- Populate attributes 6-8 (showWaitCount, showAverageWaitTime,
timeCalculationModel) from existing tool behavior. Attributes 9-12
(applicable operators, descriptions, URLs, internal comment) remain
null — those need domain expertise.
- Add WaitStatsConfig loader (PlanViewer.Core.Services.WaitStatsConfig)
that reads the JSON from an embedded resource at first access and
caches by name (case-insensitive). Resource lookup is suffix-based so
the file works whether embedded under PlanViewer.Core.* or
PlanViewer.Web.* manifest prefixes.
- BenefitScorer.IsExternalWait now delegates to WaitStatsConfig.IsExternal.
Lookup misses fall back to false, preserving prior default for unknown
waits. EmitWaitStatWarnings drops the WaitStatsKnowledge dependency
entirely.
- Delete WaitStatsKnowledge.cs — its ShowEffectiveLatency flag was the
only structural data and is now sourced from
WaitStatsConfig.ShowAverageWaitTime. Description/HowToFix were
intentionally empty since #215 D3, so nothing of substance is lost.
- Wire embedded resource into PlanViewer.Core.csproj and link it +
WaitStatsConfig.cs into PlanViewer.Web.csproj (which links Core
source files rather than referencing the project).
All 75 Core tests pass; Core, App, and Web all build clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent e9729ea commit d45a6a6
6 files changed
Lines changed: 260 additions & 333 deletions
File tree
- src
- PlanViewer.Core
- Resources
- Services
- PlanViewer.Web
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
0 commit comments