* [Qemu-devel] [PATCH v2] iotests: record separate timings per format, protocol pair
@ 2017-01-03 16:05 Daniel P. Berrange
2017-01-03 17:08 ` Eric Blake
2017-01-25 14:59 ` Max Reitz
0 siblings, 2 replies; 4+ messages in thread
From: Daniel P. Berrange @ 2017-01-03 16:05 UTC (permalink / raw)
To: qemu-devel
Cc: Eric Blake, Kevin Wolf, Max Reitz, qemu-block, Daniel P. Berrange
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>
---
Changed in v2:
- Use a separate file per format/protocol, instead of
throwing away data each time format/protocol changes
between runs (Eric)
tests/qemu-iotests/.gitignore | 2 +-
tests/qemu-iotests/Makefile | 2 +-
tests/qemu-iotests/check | 12 +++++++-----
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/tests/qemu-iotests/.gitignore b/tests/qemu-iotests/.gitignore
index 0711cbd..da62054 100644
--- a/tests/qemu-iotests/.gitignore
+++ b/tests/qemu-iotests/.gitignore
@@ -1,5 +1,5 @@
check.log
-check.time
+check.time*
common.env
*.out.bad
*.notrun
diff --git a/tests/qemu-iotests/Makefile b/tests/qemu-iotests/Makefile
index 2fb527c..27380e6 100644
--- a/tests/qemu-iotests/Makefile
+++ b/tests/qemu-iotests/Makefile
@@ -1,5 +1,5 @@
-CLEANFILES= *.out.bad *.notrun check.log check.time
+CLEANFILES= *.out.bad *.notrun check.log check.time*
# no default target
default:
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index 4cba215..4b1c674 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -129,6 +129,8 @@ fi
# exit 1
#fi
+TIMESTAMP_FILE=check.time-$IMGPROTO-$IMGFMT
+
tmp="${TEST_DIR}"/$$
_wallclock()
@@ -155,9 +157,9 @@ _wrapup()
:
elif $needwrap
then
- if [ -f check.time -a -f $tmp.time ]
+ if [ -f $TIMESTAMP_FILE -a -f $tmp.time ]
then
- cat check.time $tmp.time \
+ cat $TIMESTAMP_FILE $tmp.time \
| $AWK_PROG '
{ t[$1] = $2 }
END { if (NR > 0) {
@@ -165,7 +167,7 @@ END { if (NR > 0) {
}
}' \
| sort -n >$tmp.out
- mv $tmp.out check.time
+ mv $tmp.out $TIMESTAMP_FILE
fi
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
rm -f check.full
-[ -f check.time ] || touch check.time
+[ -f $TIMESTAMP_FILE ] || touch $TIMESTAMP_FILE
FULL_IMGFMT_DETAILS=`_full_imgfmt_details`
FULL_IMGPROTO_DETAILS=`_full_imgproto_details`
@@ -277,7 +279,7 @@ do
# really going to try and run this one
#
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
echo -n " ${lasttime}s ..."
else
--
2.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v2] iotests: record separate timings per format, protocol pair
2017-01-03 16:05 [Qemu-devel] [PATCH v2] iotests: record separate timings per format, protocol pair Daniel P. Berrange
@ 2017-01-03 17:08 ` Eric Blake
2017-01-24 12:38 ` Daniel P. Berrange
2017-01-25 14:59 ` Max Reitz
1 sibling, 1 reply; 4+ messages in thread
From: Eric Blake @ 2017-01-03 17:08 UTC (permalink / raw)
To: Daniel P. Berrange, qemu-devel; +Cc: Kevin Wolf, Max Reitz, qemu-block
[-- Attachment #1: Type: text/plain, Size: 848 bytes --]
On 01/03/2017 10:05 AM, Daniel P. Berrange wrote:
> 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>
> ---
> Changed in v2:
>
> - Use a separate file per format/protocol, instead of
> throwing away data each time format/protocol changes
> between runs (Eric)
>
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v2] iotests: record separate timings per format, protocol pair
2017-01-03 17:08 ` Eric Blake
@ 2017-01-24 12:38 ` Daniel P. Berrange
0 siblings, 0 replies; 4+ messages in thread
From: Daniel P. Berrange @ 2017-01-24 12:38 UTC (permalink / raw)
To: Eric Blake; +Cc: qemu-devel, Kevin Wolf, Max Reitz, qemu-block
On Tue, Jan 03, 2017 at 11:08:39AM -0600, Eric Blake wrote:
> On 01/03/2017 10:05 AM, Daniel P. Berrange wrote:
> > 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>
> > ---
> > Changed in v2:
> >
> > - Use a separate file per format/protocol, instead of
> > throwing away data each time format/protocol changes
> > between runs (Eric)
> >
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
Ping, any block maintainers want to take this simple patch ?
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v2] iotests: record separate timings per format, protocol pair
2017-01-03 16:05 [Qemu-devel] [PATCH v2] iotests: record separate timings per format, protocol pair Daniel P. Berrange
2017-01-03 17:08 ` Eric Blake
@ 2017-01-25 14:59 ` Max Reitz
1 sibling, 0 replies; 4+ messages in thread
From: Max Reitz @ 2017-01-25 14:59 UTC (permalink / raw)
To: Daniel P. Berrange, qemu-devel; +Cc: Eric Blake, Kevin Wolf, qemu-block
[-- Attachment #1: Type: text/plain, Size: 778 bytes --]
On 03.01.2017 17:05, Daniel P. Berrange wrote:
> 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>
> ---
> Changed in v2:
>
> - Use a separate file per format/protocol, instead of
> throwing away data each time format/protocol changes
> between runs (Eric)
Thanks, applied to my block tree:
https://github.com/XanClic/qemu/commits/block
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-01-25 14:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-03 16:05 [Qemu-devel] [PATCH v2] iotests: record separate timings per format, protocol pair Daniel P. Berrange
2017-01-03 17:08 ` Eric Blake
2017-01-24 12:38 ` Daniel P. Berrange
2017-01-25 14:59 ` Max Reitz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.