From 168bc95c91bf156964178e2e5d9e486cd521bd53 Mon Sep 17 00:00:00 2001 From: Henrik Koski <98282892+PiispaH@users.noreply.github.com> Date: Tue, 16 Jul 2024 16:48:45 +0300 Subject: [PATCH] Allow setting the amount of warmup values in Runner --- pyperf/_runner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyperf/_runner.py b/pyperf/_runner.py index cf4bbbe6..1e207e8b 100644 --- a/pyperf/_runner.py +++ b/pyperf/_runner.py @@ -75,7 +75,7 @@ def __init__(self, values=None, processes=None, loops=0, min_time=0.1, metadata=None, show_name=True, program_args=None, add_cmdline_args=None, - _argparser=None): + _argparser=None, warmups=1): # Reset the stats collection if running a --enable-pystats build try: @@ -165,7 +165,7 @@ def __init__(self, values=None, processes=None, help='number of values per process (default: %s)' % values) parser.add_argument('-w', '--warmups', - type=positive_or_nul, + type=positive_or_nul, default=warmups, help='number of skipped values per run used ' 'to warmup the benchmark') parser.add_argument('-l', '--loops',