2 # SPDX-License-Identifier: GPL-2.0+
4 # Analyze a given results directory for locktorture progress.
6 # Usage: kvm-recheck-lock.sh resdir
8 # Copyright (C) IBM Corporation, 2014
10 # Authors: Paul E. McKenney <paulmck@linux.ibm.com>
13 if test -d "$i" -a -r "$i"
17 echo Unreadable results directory
: $i
21 configfile
=`echo $i | sed -e 's/^.*\///'`
22 ncs
=`grep "Writes: Total:" $i/console.log 2> /dev/null | tail -1 | sed -e 's/^.* Total: //' -e 's/ .*$//'`
25 echo "$configfile -------"
27 title
="$configfile ------- $ncs acquisitions/releases"
28 dur
=`sed -e 's/^.* locktorture.shutdown_secs=//' -e 's/ .*$//' < $i/qemu-cmd 2> /dev/null`
33 ncsps
=`awk -v ncs=$ncs -v dur=$dur '
34 BEGIN { print ncs / dur }' < /dev/null`
35 title
="$title ($ncsps per second)"