Skip to content

track the peak Allocator counters#696

Merged
arvidn merged 2 commits intomainfrom
more-counters
Feb 11, 2026
Merged

track the peak Allocator counters#696
arvidn merged 2 commits intomainfrom
more-counters

Conversation

@arvidn
Copy link
Copy Markdown
Contributor

@arvidn arvidn commented Feb 11, 2026

When compiled with the counters feature.
This is the more interesting metric when restore_checkpoint() is used.


Note

Low Risk
Adds new optional (feature-gated) metrics and threads them through the counters output without changing allocation limits or consensus logic; risk is limited to counter correctness and minor overhead when enabled.

Overview
When built with the counters feature, the allocator now tracks peak (max) allocated atoms, pairs, and heap bytes over the lifetime of a run (excluding ghost allocations) to better reflect memory pressure even when restore_checkpoint() frees allocations.

Allocator updates these max counters on atom/pair allocations and exposes max_* getters; run_program_with_counters() now returns these new fields, and tests were extended to assert the max counters are not reduced by restore_checkpoint().

Written by Cursor Bugbot for commit c68373b. This will update automatically on new commits. Configure here.

@arvidn arvidn requested a review from matt-o-how February 11, 2026 08:22
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Comment thread src/allocator.rs
@coveralls-official
Copy link
Copy Markdown

coveralls-official bot commented Feb 11, 2026

Pull Request Test Coverage Report for Build 21900906247

Details

  • 38 of 38 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 90.528%

Totals Coverage Status
Change from base Build 21864448712: 0.05%
Covered Lines: 6623
Relevant Lines: 7316

💛 - Coveralls

@arvidn arvidn force-pushed the more-counters branch 2 times, most recently from e8937a7 to 203448e Compare February 11, 2026 08:46
…s is the more interesting metric when restore_checkpoint() is used
Comment thread src/allocator.rs Outdated
Comment thread src/allocator.rs Outdated
@arvidn arvidn requested a review from matt-o-how February 11, 2026 10:35
@arvidn arvidn merged commit 56e2991 into main Feb 11, 2026
31 checks passed
@arvidn arvidn deleted the more-counters branch February 11, 2026 10:50
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.

2 participants