Skip to content

Allow zero-valued memory metadata - #260

Merged
vstinner merged 1 commit into
psf:mainfrom
GruffElixir:fix/allow-zero-memory-metadata
Sep 13, 2026
Merged

vstinner merged 1 commit into
psf:mainfrom
GruffElixir:fix/allow-zero-memory-metadata

Conversation

@GruffElixir

Copy link
Copy Markdown
Contributor

Summary

Allow zero for memory usage metadata because resource.getrusage() can legally report ru_maxrss as zero on Linux. Other byte metadata keeps the same validation, and loop counts remain strictly positive.

Fixes #259

Test Plan

  • python -bb -Wd -m unittest discover -s pyperf/tests/ -q

Copilot AI lite review requested due to automatic review settings September 13, 2026 14:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@vstinner
vstinner merged commit 7a2a0e1 into psf:main Sep 13, 2026
14 checks passed
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.

pyperf fails when getrusage() returns zero for ru_maxrss

3 participants