Skip to content

Seed wait stats config file (#215 part 1)#296

Merged
erikdarlingdata merged 1 commit intodevfrom
feature/wait-stats-config-seed
Apr 29, 2026
Merged

Seed wait stats config file (#215 part 1)#296
erikdarlingdata merged 1 commit intodevfrom
feature/wait-stats-config-seed

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Part 1 of #215 — adds the human-readable config file that will become the single source of truth for wait stat handling.

What's in the file

src/PlanViewer.Core/Resources/WaitStats.json — 52 wait stat entries, populated only with the first 5 attributes per Joe's instruction:

  1. Name
  2. isPreemptive
  3. isExternal
  4. isImplemented
  5. isEnabled

Attributes 6-12 (showWaitCount, showAverageWaitTime, timeCalculationModel, applicableOperatorNames, description, helpfulUrls, internalComment) are intentionally null, reserved for domain-expert population.

How seeding was determined

  • Implemented (46 entries): every wait stat the tool today references explicitly, plus representative members of prefix patterns the tool matches (LCK_M_, PAGELATCH_, LATCH_, HT, PREEMPTIVE_*). Inventory came from BenefitScorer.ClassifyWaitType(), PlanViewerControl.GetWaitCategory(), and WaitStatsKnowledge.cs.
  • Not implemented (6 entries): common waits that today fall to the "Other" bucket — THREADPOOL, BACKUPIO, BACKUPBUFFER, HADR_SYNC_COMMIT, DBMIRROR_DBM_EVENT, SQLTRACE_BUFFER_FLUSH — included so both states are represented.
  • isPreemptive: true iff name starts with PREEMPTIVE_.
  • isExternal: true iff the tool's IsExternalWait() routes the wait through the CPU-based external formula (today: PREEMPTIVE_* and MEMORY_ALLOCATION*). Conservative.
  • isEnabled: true everywhere — the tool today only filters at the wait_category level (Idle, User Wait), and none of these entries fall into those.

Not in this PR

  • No code is wired to read this file yet — that's Part 2.
  • No build plumbing (<EmbeddedResource>) added yet — file is a plain checked-in JSON so reviewers can read the diff cleanly.

Test plan

  • @jobbish-sql review of seed coverage (any waits worth adding/removing?)
  • @jobbish-sql review of attribute-1-5 classifications

🤖 Generated with Claude Code

Adds src/PlanViewer.Core/Resources/WaitStats.json as the single source
of truth for wait stat handling, populated only with attributes 1-5
(name, isPreemptive, isExternal, isImplemented, isEnabled). Attributes
6-12 (calc model, applicable operators, descriptions, URLs, internal
comment) are intentionally null pending domain-expert review.

52 entries: 46 currently implemented (matched explicitly or via prefix
in BenefitScorer / PlanViewerControl / WaitStatsKnowledge), 6 common
waits that today fall to the 'Other' bucket (THREADPOOL, BACKUPIO,
BACKUPBUFFER, HADR_SYNC_COMMIT, DBMIRROR_DBM_EVENT, SQLTRACE_BUFFER_FLUSH).

No code is wired to this file yet — that's part 2.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit e9729ea into dev Apr 29, 2026
2 checks passed
@erikdarlingdata erikdarlingdata deleted the feature/wait-stats-config-seed branch April 29, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant