Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add comment about --warmups 0
  • Loading branch information
mdboom committed Jun 23, 2025
commit cd5523fd318bc583843d62afa7389db1b2ec67a6
1 change: 1 addition & 0 deletions pyperformance/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ def get_pyperf_opts(options):
if options.hook:
for hook in options.hook:
opts.append('--hook=%s' % hook)
# --warmups=0 is a valid option, so check for `not None` here
if options.warmups is not None:
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.

Suggested change
if options.warmups is not None:
if options.warmups:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We also need to be able to pass --warmups 0 explicitly when that is specified.

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.

Ah got it

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.

Can you leave the comment for it?

opts.append('--warmups=%s' % options.warmups)

Expand Down
Loading