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():
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" , type = int , default = None ,
105+ help = "number of skipped values per run used to warmup the benchmark" )
104106 filter_opts (cmd )
105107
106108 # show
Original file line number Diff line number Diff line change @@ -247,5 +247,8 @@ def get_pyperf_opts(options):
247247 if options .hook :
248248 for hook in options .hook :
249249 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 )
250253
251254 return opts
You can’t perform that action at this time.
0 commit comments