From 3df9e29c5f2e99354e6d09323d2876cfabee53cf Mon Sep 17 00:00:00 2001 From: bclodius Date: Sun, 8 Oct 2023 21:09:44 -0400 Subject: [PATCH 1/2] Add logging message to notify user of skipped benchmarks --- pyperformance/cli.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyperformance/cli.py b/pyperformance/cli.py index 34544a11..1c31f3f6 100644 --- a/pyperformance/cli.py +++ b/pyperformance/cli.py @@ -252,6 +252,11 @@ def parse_entry(o, s): # Filter out any benchmarks that can't be run on the Python version we're running if this_python_version in bench.python: selected.append(bench) + else: + message = (f"Benchmark: {bench.spec.name} is being skipped because " + f"python version required is {bench.python} " + f"but found {this_python_version}") + logging.info(message) return selected From 8f90290cb2c196f7183ab9ad71e4b0d0044248b3 Mon Sep 17 00:00:00 2001 From: bclodius Date: Mon, 9 Oct 2023 16:53:16 -0400 Subject: [PATCH 2/2] Implement review comments --- pyperformance/cli.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pyperformance/cli.py b/pyperformance/cli.py index 1c31f3f6..9f12ef03 100644 --- a/pyperformance/cli.py +++ b/pyperformance/cli.py @@ -253,10 +253,8 @@ def parse_entry(o, s): if this_python_version in bench.python: selected.append(bench) else: - message = (f"Benchmark: {bench.spec.name} is being skipped because " - f"python version required is {bench.python} " - f"but found {this_python_version}") - logging.info(message) + logging.warning("Benchmark: %s is being skipped because Python version required is %s but found %s", + bench.spec.name, bench.python, this_python_version) return selected