Skip to content

Conversation

@diegorusso
Copy link
Contributor

If the benchmark execution is exceeding the timeout execution, pyperf exits with an error 124. This error can be caught by pyperformance or other tool and report it back to the user.

If the benchmark execution is exceeding the timeout execution, pyperf
exits with an error 124. This error can be caught by pyperformance or
other tool and report it back to the user.
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

I'm fine with the overall approach, but here is a review on the actual implementation.

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

Nice, the change works as expected :-)

$ python -m pyperf timeit 'import time; time.sleep(5)' --timeout=2
Timed out after 2 seconds

Copy link
Member

@vstinner vstinner left a comment

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 07d2a77 into psf:main Sep 26, 2024
@vstinner
Copy link
Member

Merged, thanks.

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