cpu-bench: change option

This commit is contained in:
Jaewook Lee
2024-08-12 18:42:00 +09:00
parent c6ee6626e5
commit cc6dfa392f
2 changed files with 3 additions and 3 deletions

View File

@@ -1 +1 @@
.csv
*.csv

View File

@@ -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)