Skip to content

feat(runtime): Add pauseMs and runCount metrics to runtime - #890

Draft
CagriYonca wants to merge 1 commit into
mainfrom
pollrate-new-metrics
Draft

feat(runtime): Add pauseMs and runCount metrics to runtime#890
CagriYonca wants to merge 1 commit into
mainfrom
pollrate-new-metrics

Conversation

@CagriYonca

Copy link
Copy Markdown
Contributor

Current Python GC metrics (gc.collect0/1/2) are object count snapshots — when poll_rate increases, the delta grows proportionally, causing the dashboard to show higher GC pressure even if nothing changed.

Node.js and JVM solve this by exposing pause duration instead: gc.gcPause (Node.js) and gc.<collector>.time (JVM) both measure how long GC actually paused the process. The backend normalises these over a 1-minute window and fires an alert at a fixed ms threshold — independent of poll_rate.

Python's gc module doesn't expose pause duration, so the follow-up PR will add it via gc.callbacks:

  • gc.pauseMs— total pause time accumulated between polls, comparable to gc.gcPause
  • gc.runCount— number of GC cycles in the same interval, a direct signal for cyclic-reference pressure

Signed-off-by: Cagri Yonca <cagri@ibm.com>
@CagriYonca CagriYonca self-assigned this Aug 7, 2026
@CagriYonca
CagriYonca requested a review from a team as a code owner August 7, 2026 10:40
@CagriYonca
CagriYonca marked this pull request as draft August 7, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant