]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
common/filter: Improve xfs_io filter
authorJan Kara <jack@suse.cz>
Thu, 21 Jul 2016 06:15:19 +0000 (08:15 +0200)
committerEryu Guan <eguan@redhat.com>
Thu, 21 Jul 2016 09:29:05 +0000 (17:29 +0800)
On my test setup xfs_io reports 'nan' in bytes/s and ops/s fields
when the operation takes zero time. Account for that in
_filter_xfs_io.

Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/filter

index b229a97dfa0e84b538925c64e3329e742505f8e0..f80cd562af71854b7168013a74b4d0347ab52df8 100644 (file)
@@ -221,7 +221,9 @@ common_line_filter()
 
 _filter_xfs_io()
 {
-    sed -e "s/[0-9/.]* [GMKiBbytes]*, [0-9]* ops\; [0-9/:. sec]* ([inf0-9/.]* [EPGMKiBbytes]*\/sec and [inf0-9/.]* ops\/sec)/XXX Bytes, X ops\; XX:XX:XX.X (XXX YYY\/sec and XXX ops\/sec)/"
+    # Apart from standard numeric values, we also filter out 'inf' and 'nan'
+    # which can result from division in some cases
+    sed -e "s/[0-9/.]* [GMKiBbytes]*, [0-9]* ops\; [0-9/:. sec]* ([infa0-9/.]* [EPGMKiBbytes]*\/sec and [infa0-9/.]* ops\/sec)/XXX Bytes, X ops\; XX:XX:XX.X (XXX YYY\/sec and XXX ops\/sec)/"
 }
 
 _filter_xfs_io_unique()