Skip to content

GH-114911: use time.perf_counter in Stopwatch #131469

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 28, 2025
Merged

Conversation

chris-eibl
Copy link
Member

@chris-eibl chris-eibl commented Mar 19, 2025

Use perf_counter in Stopwatch.

I temporarily added

    def test_denial_of_service_prevented_str_to_int_many(self):
        for i in range(1000):
            self.test_denial_of_service_prevented_str_to_int()

to test_int.py. With process_time it always failed, with perf_counter it always succeeded.

I think this is a skip news?

Copy link
Member

@AA-Turner AA-Turner left a comment

Choose a reason for hiding this comment

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

Looks reasonable.

A

chris-eibl and others added 2 commits March 21, 2025 12:49
@encukou encukou added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Mar 24, 2025
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @encukou for commit 39eb532 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F131469%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Mar 24, 2025
@ZeroIntensity ZeroIntensity added the tests Tests in the Lib/test dir label Mar 27, 2025
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@AA-Turner AA-Turner requested a review from encukou April 24, 2025 14:53
@encukou encukou merged commit 11f457c into python:main Apr 28, 2025
38 checks passed
@chris-eibl chris-eibl deleted the stopwatch branch April 28, 2025 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants