GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-80642: timeit - Additional changes for autorange by alessandrocucci · Pull Request #12954 · python/cpython

Conversation

@alessandrocucci

@alessandrocucci alessandrocucci commented Apr 25, 2019 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • make the 0.2s time configurable;
  • have timeit and repeat methods (and functions) fall back
    on autorange if the number is set to 0 or None.

https://bugs.python.org/issue36461

  • Issue: timeit: Additional changes for autorange #80642

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bsolomon1124 and gabrielfougeron reacted with thumbs up emoji
All reactions
  • 👍 2 reactions
@alessandrocucci @acuccie3
- make the 0.2s time configurable;
94dfd6b
- have `timeit` and `repeat` methods (and functions) fall back
  on `autorange` if the number is set to 0 or None.
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Apr 25, 2019
@bedevere-bot bedevere-bot added the awaiting review label Apr 25, 2019
@blurb-it
📜🤖 Added by blurb_it.
ba26f88
@tirkarthi tirkarthi mentioned this pull request Apr 26, 2019
bpo-36461: Added the total_time parameter to the timeit.autorange() function. #12953
Closed
auvipy
auvipy suggested changes Apr 28, 2019
View reviewed changes
Comment thread Doc/library/timeit.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added awaiting core review and removed awaiting review labels Apr 28, 2019
@alessandrocucci @acuccie3
Version changed
901aceb
@bsolomon1124

bsolomon1124 commented May 12, 2019

Copy link
Copy Markdown
Contributor

Was there consideration given to adding autorange() as a module-level function, in addition to being an instance method of Timer as is added here?

Since timeit already uses a "prebound method pattern" to put timeit() and repeat() there, maybe autorange() belongs with them?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@alessandrocucci

alessandrocucci commented May 13, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

that was not discussed in issue36461
I personally don't think it's necessary, do you have an use case?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bsolomon1124

bsolomon1124 commented May 13, 2019

Copy link
Copy Markdown
Contributor

Actually, looking at things more carefully, I don't think it's necessary, since it looks like autorange() is really just meant to be used in timeit()/repeat(), which are already available as module-level functions. So please just disregard my previous comment.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Carreau

Carreau commented May 25, 2019

Copy link
Copy Markdown
Contributor

if i understand this correctly max_time_taken is an ill-chosen name, it should be min_time_taken, shouldn't it ?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@alessandrocucci

alessandrocucci commented May 25, 2019

Copy link
Copy Markdown
Contributor Author

There is a proposal to rename it to "target_time", as Steven wrote in https://bugs.python.org/issue36461

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

alessandrocucci added 4 commits May 26, 2019 12:33
@alessandrocucci
Changes after first review by Steven
f014a68
@alessandrocucci
Update 2019-04-25-21-11-37.bpo-36461.TO5YyP.rst
82d6d5a
@alessandrocucci
Fix doc
dbae825
@alessandrocucci
Merge branch 'fix-issue-36461' of https://github.com/alessandrocucci/…
952df57
…cpython into fix-issue-36461
@rhettinger

rhettinger commented May 10, 2022

Copy link
Copy Markdown
Contributor

ISTM that almost the entire point of having autorange() was to avoid the need for configuration.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ezio-melotti ezio-melotti removed the CLA signed label Jul 13, 2022
iritkatriel
iritkatriel requested changes Dec 6, 2022
View reviewed changes

@iritkatriel iritkatriel left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This has merge conflicts now.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot added awaiting changes and removed awaiting core review labels Dec 6, 2022
@bedevere-bot

bedevere-bot commented Dec 6, 2022

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@csabella csabella mentioned this pull request Aug 13, 2023
timeit: Additional changes for autorange #80642
Closed
@miikka miikka mentioned this pull request Oct 18, 2025
gh-80642: timeit - make target time of autorange configurable #140283
Merged
@StanFromIreland StanFromIreland changed the title bpo-36461: timeit - Additional changes for autorange bpo-80642: timeit - Additional changes for autorange Oct 18, 2025
@StanFromIreland

StanFromIreland commented Oct 18, 2025

Copy link
Copy Markdown
Member

This PR has been stale for over three years, closing in favour of #140283

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@StanFromIreland StanFromIreland closed this Oct 18, 2025
@StanFromIreland StanFromIreland changed the title bpo-80642: timeit - Additional changes for autorange gh-80642: timeit - Additional changes for autorange Oct 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@iritkatriel iritkatriel iritkatriel requested changes
+1 more reviewer
@auvipy auvipy auvipy requested changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting changes

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

10 participants

@alessandrocucci @bsolomon1124 @Carreau @rhettinger @bedevere-bot @StanFromIreland @iritkatriel @auvipy @the-knights-who-say-ni @ezio-melotti
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.