From cc6dfa392f6cef3dcec09b1d734021f706464601 Mon Sep 17 00:00:00 2001 From: Jaewook Lee <11328376+jaewooklee93@users.noreply.github.com> Date: Mon, 12 Aug 2024 18:42:00 +0900 Subject: [PATCH] cpu-bench: change option --- cpu-bench/.gitignore | 2 +- cpu-bench/bench.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cpu-bench/.gitignore b/cpu-bench/.gitignore index df2929e..afed073 100644 --- a/cpu-bench/.gitignore +++ b/cpu-bench/.gitignore @@ -1 +1 @@ -.csv +*.csv diff --git a/cpu-bench/bench.py b/cpu-bench/bench.py index 14df329..3e24934 100755 --- a/cpu-bench/bench.py +++ b/cpu-bench/bench.py @@ -5,11 +5,11 @@ from tabulate import tabulate warnings.filterwarnings("ignore") R, G, B, W = (f'\x1b[{x}m' for x in (31, 32, 34, 0)) subprocess.run('neofetch') -print(f'{G}$ sysbench cpu --threads=$(nproc) run | grep "events per second"{W}') +print(f'{G}$ sysbench cpu --cpu-max-prime=20000 --time=1 --threads=$(nproc) run | grep second{W}') def speed(core): output = subprocess.run( - f'sysbench cpu --threads={core} run | grep "events per second"', + f'sysbench cpu --cpu-max-prime=20000 --time=1 --threads={core} run | grep second', shell=True, capture_output=True, text=True).stdout.split()[-1] return float(output)