Skip to content

Commit 904c17f

Browse files
committed
Pass --warmup along to pyperf
1 parent ec9e291 commit 904c17f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

pyperformance/cli.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ def parse_args():
101101
choices=hook_names,
102102
metavar=f"{', '.join(x for x in hook_names if not x.startswith('_'))}",
103103
help="Apply the given pyperf hook(s) when running each benchmark")
104+
cmd.add_argument("--warmups",
105+
help="number of skipped values per run used to warmup the benchmark")
104106
filter_opts(cmd)
105107

106108
# show

pyperformance/run.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,5 +247,7 @@ def get_pyperf_opts(options):
247247
if options.hook:
248248
for hook in options.hook:
249249
opts.append('--hook=%s' % hook)
250+
if options.warmup:
251+
opts.append('--warmup=%s' % options.warmup)
250252

251253
return opts

0 commit comments

Comments
 (0)