2014-02-08 07:47:12 +08:00
|
|
|
#!/bin/bash
|
2019-02-11 23:14:09 +08:00
|
|
|
# SPDX-License-Identifier: GPL-2.0+
|
2014-02-08 07:47:12 +08:00
|
|
|
#
|
|
|
|
# Analyze a given results directory for locktorture progress.
|
|
|
|
#
|
2014-07-12 07:47:35 +08:00
|
|
|
# Usage: kvm-recheck-lock.sh resdir
|
2014-02-08 07:47:12 +08:00
|
|
|
#
|
|
|
|
# Copyright (C) IBM Corporation, 2014
|
|
|
|
#
|
2019-02-11 23:14:09 +08:00
|
|
|
# Authors: Paul E. McKenney <paulmck@linux.ibm.com>
|
2014-02-08 07:47:12 +08:00
|
|
|
|
|
|
|
i="$1"
|
2017-11-03 18:17:25 +08:00
|
|
|
if test -d "$i" -a -r "$i"
|
2014-02-08 07:47:12 +08:00
|
|
|
then
|
|
|
|
:
|
|
|
|
else
|
|
|
|
echo Unreadable results directory: $i
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
configfile=`echo $i | sed -e 's/^.*\///'`
|
|
|
|
ncs=`grep "Writes: Total:" $i/console.log 2> /dev/null | tail -1 | sed -e 's/^.* Total: //' -e 's/ .*$//'`
|
|
|
|
if test -z "$ncs"
|
|
|
|
then
|
2014-03-18 04:42:33 +08:00
|
|
|
echo "$configfile -------"
|
2014-02-08 07:47:12 +08:00
|
|
|
else
|
|
|
|
title="$configfile ------- $ncs acquisitions/releases"
|
2021-06-16 07:31:16 +08:00
|
|
|
dur=`grep -v '^#' $i/qemu-cmd | sed -e 's/^.* locktorture.shutdown_secs=//' -e 's/ .*$//' 2> /dev/null`
|
2014-02-08 07:47:12 +08:00
|
|
|
if test -z "$dur"
|
|
|
|
then
|
|
|
|
:
|
|
|
|
else
|
|
|
|
ncsps=`awk -v ncs=$ncs -v dur=$dur '
|
|
|
|
BEGIN { print ncs / dur }' < /dev/null`
|
|
|
|
title="$title ($ncsps per second)"
|
|
|
|
fi
|
|
|
|
echo $title
|
|
|
|
fi
|