summaryrefslogtreecommitdiff
path: root/internal/statsengine
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-13 10:21:56 +0300
committerPaul Buetow <paul@buetow.org>2026-05-13 10:21:56 +0300
commit7c15d6058cf56e8c7801259f1f842a3a010c5f41 (patch)
tree0b9f85dadade5958a281ab6abaa51dcb620603f2 /internal/statsengine
parent42d7821dc8d81781f2c3cfc269e99c0ee1dbd017 (diff)
fix: guard Pair.CalculateDurations against uint64 underflow on clock skew
BPF timestamps can be non-monotonic across CPUs (NTP step, TSC skew). When exit < enter or enter < prevPairTime the uint64 subtraction wraps to a huge value, corrupting latency histograms and flamegraph weights. Clamp both Duration and DurationToPrev to 0 instead of underflowing. Add TestPairCalculateDurationsNegativeDelta to cover this case. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/statsengine')
0 files changed, 0 insertions, 0 deletions