File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,8 @@ def parse_args():
101
101
choices = hook_names ,
102
102
metavar = f"{ ', ' .join (x for x in hook_names if not x .startswith ('_' ))} " ,
103
103
help = "Apply the given pyperf hook(s) when running each benchmark" )
104
+ cmd .add_argument ("--warmups" , type = int , default = None ,
105
+ help = "number of skipped values per run used to warmup the benchmark" )
104
106
filter_opts (cmd )
105
107
106
108
# show
Original file line number Diff line number Diff line change @@ -247,5 +247,8 @@ def get_pyperf_opts(options):
247
247
if options .hook :
248
248
for hook in options .hook :
249
249
opts .append ('--hook=%s' % hook )
250
+ # --warmups=0 is a valid option, so check for `not None` here
251
+ if options .warmups is not None :
252
+ opts .append ('--warmups=%s' % options .warmups )
250
253
251
254
return opts
You can’t perform that action at this time.
0 commit comments