mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-19 21:31:37 +00:00
Allow 7-zip benchmark to run multiple times
This commit is contained in:
parent
b293f186fb
commit
e63138bacd
1 changed files with 7 additions and 2 deletions
|
@ -239,6 +239,7 @@ ParseOptions() {
|
||||||
;;
|
;;
|
||||||
z)
|
z)
|
||||||
# Do a quick 7-zip benchmark to estimate CPU performance
|
# Do a quick 7-zip benchmark to estimate CPU performance
|
||||||
|
runs=$2
|
||||||
Run7ZipBenchmark 2>/dev/null
|
Run7ZipBenchmark 2>/dev/null
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
@ -1112,9 +1113,13 @@ Run7ZipBenchmark() {
|
||||||
trap "rm \"${MonitoringOutput}\" ; exit 0" 0 1 2 3 15
|
trap "rm \"${MonitoringOutput}\" ; exit 0" 0 1 2 3 15
|
||||||
armbianmonitor -m >${MonitoringOutput} &
|
armbianmonitor -m >${MonitoringOutput} &
|
||||||
MonitoringPID=$!
|
MonitoringPID=$!
|
||||||
# run 7-zip benchmark after waiting 10 seconds to spot whether the system was idle before
|
# run 7-zip benchmarks after waiting 10 seconds to spot whether the system was idle before.
|
||||||
|
# We run the benchmark a single time by default unless otherwise specified on the command line
|
||||||
|
RunHowManyTimes=${runs:-1}
|
||||||
sleep 10
|
sleep 10
|
||||||
"${MyTool}" b
|
for ((i=1;i<=RunHowManyTimes;i++)); do
|
||||||
|
"${MyTool}" b
|
||||||
|
done
|
||||||
# report CLI monitoring results as well
|
# report CLI monitoring results as well
|
||||||
kill ${MonitoringPID}
|
kill ${MonitoringPID}
|
||||||
echo -e "\nMonitoring output recorded while running the benchmark:\n"
|
echo -e "\nMonitoring output recorded while running the benchmark:\n"
|
||||||
|
|
Loading…
Add table
Reference in a new issue