aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThara Gopinath <thara.gopinath@linaro.org>2022-01-06 12:04:12 -0500
committerThara Gopinath <thara.gopinath@linaro.org>2022-01-06 12:05:50 -0500
commit93d4a4bd066c627f4ffdde8c83b585b96f3f666a (patch)
tree7226a91b6592443434404da68e7dec130ee0d2de
parentb51a5fb83ca855560e98d42cec6afd226232cf6d (diff)
Update benchmarks.sh to change the fixed threads parameter in sysbench runsHEADmaster
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-xbenchmarks.sh11
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()