From 5a9604142952e2faa25b052069a237aa7bcded24 Mon Sep 17 00:00:00 2001 From: Ken Jin Date: Sun, 7 Dec 2025 14:40:10 +0000 Subject: [PATCH] Add option for rigorous in benchmark.conf.sample --- doc/benchmark.conf.sample | 2 ++ pyperformance/compile.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/doc/benchmark.conf.sample b/doc/benchmark.conf.sample index 42208e68..97bc5985 100644 --- a/doc/benchmark.conf.sample +++ b/doc/benchmark.conf.sample @@ -96,6 +96,8 @@ affinity = # disabled. upload = False +# --rigorous option for 'pyperformance run' +rigorous = False # Configuration to upload results to a Codespeed website [upload] diff --git a/pyperformance/compile.py b/pyperformance/compile.py index fb514dce..54219f06 100644 --- a/pyperformance/compile.py +++ b/pyperformance/compile.py @@ -570,6 +570,8 @@ def run_benchmark(self, python=None): cmd.append("--debug-single-value") if self.conf.same_loops: cmd.append("--same_loops=%s" % self.conf.same_loops) + if self.conf.rigorous: + cmd.append("--rigorous") exitcode = self.run_nocheck(*cmd) if os.path.exists(self.filename): @@ -842,6 +844,7 @@ def getint(section, key, default=None): conf.affinity = getstr("run_benchmark", "affinity", default="") conf.upload = getboolean("run_benchmark", "upload", False) conf.same_loops = getfile("run_benchmark", "same_loops", default="") + conf.rigorous = getboolean("run_benchmark", "rigorous", False) # paths conf.build_dir = os.path.join(conf.directory, "build")