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)