Skip to content

Add gap detection to all delta collectors (#633)#638

Merged
erikdarlingdata merged 1 commit into
devfrom
fix/delta-gap-detection-633
Mar 19, 2026
Merged

Add gap detection to all delta collectors (#633)#638
erikdarlingdata merged 1 commit into
devfrom
fix/delta-gap-detection-633

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

The maxGapSeconds fix from PR #546 was only applied to the perfmon collector. All other cumulative-counter collectors produced inflated spike deltas after app restart.

Now all 5 remaining collectors pass collectionTime and maxGapSeconds: 300 to CalculateDelta:

  • File I/O (8 calls)
  • Wait stats (3 calls)
  • Query stats (8 calls)
  • Procedure stats (6 calls)
  • Memory grants (2 calls)

Fixes the delta spike portion of #633.

🤖 Generated with Claude Code

The maxGapSeconds + collectionTime gap detection was only on the
perfmon collector. All other cumulative-counter collectors (file I/O,
wait stats, query stats, procedure stats, memory grants) produced
inflated deltas after app restart because the cached baseline could
be hours old.

Now all CalculateDelta calls pass collectionTime and maxGapSeconds=300
(5 minutes). If the gap since the last cached value exceeds 5 minutes,
the delta is treated as a new baseline (returns 0) instead of
computing against the stale value.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit 366dced into dev Mar 19, 2026
@erikdarlingdata erikdarlingdata deleted the fix/delta-gap-detection-633 branch April 9, 2026 00:33
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