From: Jan Kara Date: Thu, 21 Jul 2016 06:15:19 +0000 (+0200) Subject: common/filter: Improve xfs_io filter X-Git-Tag: v2022.05.01~2422 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e1f94410fcf9f50e0db2a02a93617022a3fb74be;p=users%2Fhch%2Fxfstests-dev.git common/filter: Improve xfs_io filter 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 Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- diff --git a/common/filter b/common/filter index b229a97df..f80cd562a 100644 --- a/common/filter +++ b/common/filter @@ -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()