Skip to content

fix: exclude idle samples from CPU stats - #55

Merged
P403n1x87 merged 1 commit into
mainfrom
fix/stats-cpu-idle
Oct 9, 2026
Merged

P403n1x87 merged 1 commit into
mainfrom
fix/stats-cpu-idle

Conversation

@P403n1x87

@P403n1x87 P403n1x87 commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

In full mode, AustinStats.update used the sample time for CPU stats regardless of the idle flag, so CPU totals were identical to wall totals. Idle samples now only contribute to wall time, consistent with what the speedscope and pprof exporters already do.

A regression test loads a full-mode stream with one active and one idle sample and checks the CPU, wall and memory totals.

In full mode, AustinStats counted the time of idle samples towards CPU
statistics, making them identical to wall time. Idle samples now only
contribute to wall time, consistent with the speedscope and pprof
exporters.
@codecov

codecov Bot commented Oct 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.58%. Comparing base (bef69f8) to head (928ca75).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #55      +/-   ##
==========================================
+ Coverage   78.21%   78.58%   +0.37%     
==========================================
  Files          20       20              
  Lines        1983     1985       +2     
  Branches      245      246       +1     
==========================================
+ Hits         1551     1560       +9     
+ Misses        357      353       -4     
+ Partials       75       72       -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@P403n1x87
P403n1x87 merged commit d4093fa into main Oct 9, 2026
19 checks passed
@P403n1x87
P403n1x87 deleted the fix/stats-cpu-idle branch October 9, 2026 14: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