iotests: record separate timings per format,protocol pair
The 'check' program records timings for each test that is run. These timings are only valid, however, for a particular format/protocol combination. So if frequently running 'check' with a variety of different formats or protocols, the times printed can be very misleading. Instead of having a single 'check.time' file, maintain multiple 'check.time-$IMGPROTO-$IMGFMT' files. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 20170103160556.9895-1-berrange@redhat.com Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
53b63460f6
commit
36bd422812
|
@ -1,5 +1,5 @@
|
||||||
check.log
|
check.log
|
||||||
check.time
|
check.time*
|
||||||
common.env
|
common.env
|
||||||
*.out.bad
|
*.out.bad
|
||||||
*.notrun
|
*.notrun
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
CLEANFILES= *.out.bad *.notrun check.log check.time
|
CLEANFILES= *.out.bad *.notrun check.log check.time*
|
||||||
|
|
||||||
# no default target
|
# no default target
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -129,6 +129,8 @@ fi
|
||||||
# exit 1
|
# exit 1
|
||||||
#fi
|
#fi
|
||||||
|
|
||||||
|
TIMESTAMP_FILE=check.time-$IMGPROTO-$IMGFMT
|
||||||
|
|
||||||
tmp="${TEST_DIR}"/$$
|
tmp="${TEST_DIR}"/$$
|
||||||
|
|
||||||
_wallclock()
|
_wallclock()
|
||||||
|
@ -155,9 +157,9 @@ _wrapup()
|
||||||
:
|
:
|
||||||
elif $needwrap
|
elif $needwrap
|
||||||
then
|
then
|
||||||
if [ -f check.time -a -f $tmp.time ]
|
if [ -f $TIMESTAMP_FILE -a -f $tmp.time ]
|
||||||
then
|
then
|
||||||
cat check.time $tmp.time \
|
cat $TIMESTAMP_FILE $tmp.time \
|
||||||
| $AWK_PROG '
|
| $AWK_PROG '
|
||||||
{ t[$1] = $2 }
|
{ t[$1] = $2 }
|
||||||
END { if (NR > 0) {
|
END { if (NR > 0) {
|
||||||
|
@ -165,7 +167,7 @@ END { if (NR > 0) {
|
||||||
}
|
}
|
||||||
}' \
|
}' \
|
||||||
| sort -n >$tmp.out
|
| sort -n >$tmp.out
|
||||||
mv $tmp.out check.time
|
mv $tmp.out $TIMESTAMP_FILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f $tmp.expunged ]
|
if [ -f $tmp.expunged ]
|
||||||
|
@ -223,7 +225,7 @@ echo "preamble" > "${TEST_DIR}"/check.sts
|
||||||
# don't leave old full output behind on a clean run
|
# don't leave old full output behind on a clean run
|
||||||
rm -f check.full
|
rm -f check.full
|
||||||
|
|
||||||
[ -f check.time ] || touch check.time
|
[ -f $TIMESTAMP_FILE ] || touch $TIMESTAMP_FILE
|
||||||
|
|
||||||
FULL_IMGFMT_DETAILS=`_full_imgfmt_details`
|
FULL_IMGFMT_DETAILS=`_full_imgfmt_details`
|
||||||
FULL_IMGPROTO_DETAILS=`_full_imgproto_details`
|
FULL_IMGPROTO_DETAILS=`_full_imgproto_details`
|
||||||
|
@ -277,7 +279,7 @@ do
|
||||||
# really going to try and run this one
|
# really going to try and run this one
|
||||||
#
|
#
|
||||||
rm -f $seq.out.bad
|
rm -f $seq.out.bad
|
||||||
lasttime=`sed -n -e "/^$seq /s/.* //p" <check.time`
|
lasttime=`sed -n -e "/^$seq /s/.* //p" <$TIMESTAMP_FILE`
|
||||||
if [ "X$lasttime" != X ]; then
|
if [ "X$lasttime" != X ]; then
|
||||||
echo -n " ${lasttime}s ..."
|
echo -n " ${lasttime}s ..."
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue