diff options
author | Thara Gopinath <thara.gopinath@linaro.org> | 2022-01-06 12:04:12 -0500 |
---|---|---|
committer | Thara Gopinath <thara.gopinath@linaro.org> | 2022-01-06 12:05:50 -0500 |
commit | 93d4a4bd066c627f4ffdde8c83b585b96f3f666a (patch) | |
tree | 7226a91b6592443434404da68e7dec130ee0d2de | |
parent | b51a5fb83ca855560e98d42cec6afd226232cf6d (diff) |
Update benchmarks.sh so that threads is equal to the number of
online cpus rather than fixed number 8 in sysbench runs.
Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
-rwxr-xr-x | benchmarks.sh | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/benchmarks.sh b/benchmarks.sh index fce9993..1528121 100755 --- a/benchmarks.sh +++ b/benchmarks.sh @@ -12,6 +12,8 @@ CRYPTSETUP=cryptsetup run_tests() { +nr_cpus=$(cat /proc/cpuinfo | grep processor | wc -l) + #mbw echo >> $OUTPUT_FILE echo "Testing mbw (mbw 1500)" >> $OUTPUT_FILE @@ -19,18 +21,19 @@ echo >> $OUTPUT_FILE (set -x ; $MBW 1500 >> $OUTPUT_FILE) sleep 30 + #sysbench cpu echo >> $OUTPUT_FILE -echo "Testing sysbench cpu ( sysbench cpu --threads=8 --time=60 --cpu-max-prime=100000 run )" >> $OUTPUT_FILE +echo "Testing sysbench cpu ( sysbench cpu --threads=$nr_cpus --time=60 --cpu-max-prime=100000 run )" >> $OUTPUT_FILE echo >> $OUTPUT_FILE -(set -x; $SYSBENCH cpu --threads=8 --time=60 --cpu-max-prime=100000 run >> $OUTPUT_FILE) +(set -x; $SYSBENCH cpu --threads=$nr_cpus --time=60 --cpu-max-prime=100000 run >> $OUTPUT_FILE) sleep 30 #sysbench memory echo >> $OUTPUT_FILE -echo "Testing sysbench memory ( sysbench memory --threads=8 --memory-total-size=1G run)" >> $OUTPUT_FILE +echo "Testing sysbench memory ( sysbench memory --threads=$nr_cpus --memory-total-size=1G run)" >> $OUTPUT_FILE echo >> $OUTPUT_FILE -(set -x; $SYSBENCH memory --threads=8 --memory-total-size=1G run >> $OUTPUT_FILE) +(set -x; $SYSBENCH memory --threads=$nr_cpus --memory-total-size=1G run >> $OUTPUT_FILE) } default_system_test() |