summaryrefslogtreecommitdiffstats
path: root/benchmarking/conftest.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:24:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:24:24 +0000
commit12e8343068b906f8b2afddc5569968a8a91fa5b0 (patch)
tree75cc5e05a4392ea0292251898f992a15a16b172b /benchmarking/conftest.py
parentInitial commit. (diff)
downloadmarkdown-it-py-12e8343068b906f8b2afddc5569968a8a91fa5b0.tar.xz
markdown-it-py-12e8343068b906f8b2afddc5569968a8a91fa5b0.zip
Adding upstream version 2.1.0.upstream/2.1.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'benchmarking/conftest.py')
-rw-r--r--benchmarking/conftest.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/benchmarking/conftest.py b/benchmarking/conftest.py
new file mode 100644
index 0000000..a50c057
--- /dev/null
+++ b/benchmarking/conftest.py
@@ -0,0 +1,12 @@
+def pytest_benchmark_update_machine_info(config, machine_info):
+ import psutil
+
+ freq = psutil.cpu_freq()
+ machine_info["psutil"] = {
+ "cpu_count": psutil.cpu_count(logical=False),
+ "cpu_count_logical": psutil.cpu_count(logical=True),
+ "cpu_percent": psutil.cpu_percent(),
+ "cpu_freq_min": freq.min,
+ "cpu_freq_max": freq.max,
+ "cpu_freq_current": freq.current,
+ }