diff --git a/src/PlanViewer.Core/Resources/WaitStats.json b/src/PlanViewer.Core/Resources/WaitStats.json new file mode 100644 index 0000000..375f7ba --- /dev/null +++ b/src/PlanViewer.Core/Resources/WaitStats.json @@ -0,0 +1,766 @@ +{ + "_meta": { + "purpose": "Single source of truth for wait stat handling. Per issue #215, this file will entirely drive the wait stats functionality once Part 2 lands. Today it is a seed for review — only attributes 1-5 are populated. Attributes 6-12 are intentionally null and reserved for domain-expert (Joe Obbish) population.", + "schema": { + "name": "Wait stat name (e.g., PAGEIOLATCH_SH).", + "isPreemptive": "True iff the wait runs preemptively (Windows kernel time, name prefix PREEMPTIVE_).", + "isExternal": "True iff time accrues to CPU rather than (elapsed - cpu); today scoped to PREEMPTIVE_* and MEMORY_ALLOCATION*.", + "isImplemented": "True iff the tool currently has explicit handling (categorizer match, knowledge entry, or specialized benefit formula). False = wait is collected but falls to the 'Other' bucket.", + "isEnabled": "True iff the tool should surface this wait in analysis/display.", + "showWaitCount": "(Pending) Show waits-recorded count alongside wait time.", + "showAverageWaitTime": "(Pending) Show wait_ms / wait_count alongside totals.", + "timeCalculationModel": "(Pending) One of 'direct', 'cpu time based', or 'elapsed time based'.", + "applicableOperatorNames": "(Pending) Operator names this wait can plausibly attribute to (only for 'elapsed time based').", + "description": "(Pending) End-user description.", + "helpfulUrls": "(Pending) Reference links.", + "internalComment": "(Pending) Maintainer notes; never shown to end users." + }, + "seedNotes": [ + "Population is bounded to wait names the tool today references explicitly OR commonly-seen waits matched by prefix patterns (LCK_M_*, PAGELATCH_*, LATCH_*, HT*, PREEMPTIVE_*). Pattern members beyond these representative entries can be added as needed.", + "A small set of unimplemented-but-common waits is included with isImplemented=false so both states are represented.", + "Today the tool also collects waits at the SQL Server wait_category level via sys.query_store_wait_stats, filtering categories 11 (Idle) and 18 (User Wait). Nothing in this seed falls into those categories." + ] + }, + + "waitStats": [ + { + "name": "PAGEIOLATCH_SH", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "PAGEIOLATCH_EX", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "PAGEIOLATCH_UP", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "PAGEIOLATCH_DT", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + + { + "name": "PAGELATCH_SH", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "PAGELATCH_EX", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "PAGELATCH_UP", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "PAGELATCH_DT", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + + { + "name": "LATCH_EX", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "LATCH_SH", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "LATCH_UP", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "LATCH_KP", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + + { + "name": "LCK_M_S", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "LCK_M_U", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "LCK_M_X", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "LCK_M_IS", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "LCK_M_IU", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "LCK_M_IX", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "LCK_M_SCH_S", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "LCK_M_SCH_M", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "LCK_M_RS_S", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + + { + "name": "CXPACKET", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "CXCONSUMER", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "CXSYNC_PORT", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "CXSYNC_CONSUMER", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + + { + "name": "HTBUILD", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "HTREPARTITION", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "HTMEMO", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "HTDELETE", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "BMPBUILD", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "BPSORT", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + + { + "name": "RESOURCE_SEMAPHORE", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "CMEMTHREAD", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "MEMORY_ALLOCATION_EXT", + "isPreemptive": false, + "isExternal": true, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "SOS_PHYS_PAGE_CACHE", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + + { + "name": "IO_COMPLETION", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "ASYNC_IO_COMPLETION", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "WRITELOG", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + + { + "name": "ASYNC_NETWORK_IO", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + + { + "name": "SOS_SCHEDULER_YIELD", + "isPreemptive": false, + "isExternal": false, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + + { + "name": "PREEMPTIVE_OS_AUTHENTICATIONOPS", + "isPreemptive": true, + "isExternal": true, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "PREEMPTIVE_OS_FILEOPS", + "isPreemptive": true, + "isExternal": true, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "PREEMPTIVE_OS_WRITEFILEGATHER", + "isPreemptive": true, + "isExternal": true, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "PREEMPTIVE_OS_LOOKUPACCOUNTSID", + "isPreemptive": true, + "isExternal": true, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "PREEMPTIVE_HTTP_REQUEST", + "isPreemptive": true, + "isExternal": true, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "PREEMPTIVE_OLEDBOPS", + "isPreemptive": true, + "isExternal": true, + "isImplemented": true, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + + { + "name": "THREADPOOL", + "isPreemptive": false, + "isExternal": false, + "isImplemented": false, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "BACKUPIO", + "isPreemptive": false, + "isExternal": false, + "isImplemented": false, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "BACKUPBUFFER", + "isPreemptive": false, + "isExternal": false, + "isImplemented": false, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "HADR_SYNC_COMMIT", + "isPreemptive": false, + "isExternal": false, + "isImplemented": false, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "DBMIRROR_DBM_EVENT", + "isPreemptive": false, + "isExternal": false, + "isImplemented": false, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + }, + { + "name": "SQLTRACE_BUFFER_FLUSH", + "isPreemptive": false, + "isExternal": false, + "isImplemented": false, + "isEnabled": true, + "showWaitCount": null, + "showAverageWaitTime": null, + "timeCalculationModel": null, + "applicableOperatorNames": null, + "description": null, + "helpfulUrls": null, + "internalComment": null + } + ] +}