Skip to content
Permalink
Browse files

Move 7z test to multi-threaded

  • Loading branch information...
NEMS Linux
NEMS Linux committed May 14, 2019
1 parent 112aeed commit d0bda6edc7293c22115a0e58e8b6ebfee41b36c6
Showing with 9 additions and 11 deletions.
  1. +7 −9 benchmark.sh
  2. +2 −2 info.sh
@@ -79,16 +79,14 @@ if [[ -z $prog ]]; then
fi

if [[ ! -z $prog ]]; then
# Get the total result from first CPU core
taskset -c 0 "$prog" b > $tmpdir/7z.log
result1=$(awk -F" " '/^Tot:/ {print $4}' <$tmpdir/7z.log | tr '\n' ', ' | sed 's/,$//')
# Get the total result from last CPU core (might be big.LITTLE, or could be same core)
taskset -c $(( $cores - 1 )) "$prog" b > $tmpdir/7z.log
result2=$(awk -F" " '/^Tot:/ {print $4}' <$tmpdir/7z.log | tr '\n' ', ' | sed 's/,$//')
average7z=$(( ($result1 + $result2) / 2 ))

# Multithreaded test
"$prog" b > $tmpdir/7z.log
result7z=$(awk -F" " '/^Tot:/ {print $4}' <$tmpdir/7z.log | tr '\n' ', ' | sed 's/,$//')
echo "Done." >> $tmpdir/nems-benchmark.log
echo "7z Benchmark Result: $average7z" >> $tmpdir/nems-benchmark.log
echo $average7z > /var/log/nems/benchmarks/7z
echo "7z Benchmark Result: $result7z" >> $tmpdir/nems-benchmark.log
echo $result7z > /var/log/nems/benchmarks/7z-multithread

else
echo "Can't find or install p7zip. 7z benchmark skipped." >> $tmpdir/nems-benchmark.log
fi
@@ -372,8 +372,8 @@ elif [[ $COMMAND == "benchmark" ]]; then
fi
fi
if [[ $VARIABLE == '7z' ]]; then
if [[ -f /var/log/nems/benchmarks/7z ]]; then
cat /var/log/nems/benchmarks/7z
if [[ -f /var/log/nems/benchmarks/7z-multithread ]]; then
cat /var/log/nems/benchmarks/7z-multithread
else
echo 0
fi

0 comments on commit d0bda6e

Please sign in to comment.
You can’t perform that action at this time.