From patchwork Thu Jul 21 08:14:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kara X-Patchwork-Id: 9241099 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E91666077C for ; Thu, 21 Jul 2016 08:14:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D86322074F for ; Thu, 21 Jul 2016 08:14:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CCDD926246; Thu, 21 Jul 2016 08:14:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_TVD_MIME_EPI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E2C727A98 for ; Thu, 21 Jul 2016 08:14:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751762AbcGUIO3 (ORCPT ); Thu, 21 Jul 2016 04:14:29 -0400 Received: from mx2.suse.de ([195.135.220.15]:44200 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751719AbcGUIOZ (ORCPT ); Thu, 21 Jul 2016 04:14:25 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 77E2EAAB7; Thu, 21 Jul 2016 08:14:23 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id BA04C1E0F11; Thu, 21 Jul 2016 10:14:22 +0200 (CEST) Date: Thu, 21 Jul 2016 10:14:22 +0200 From: Jan Kara To: Eryu Guan Cc: Jan Kara , fstests@vger.kernel.org Subject: Re: [PATCH 2/2] generic/130: Improve xfs_io filter Message-ID: <20160721081422.GA7901@quack2.suse.cz> References: <1469081856-6424-1-git-send-email-jack@suse.cz> <1469081856-6424-2-git-send-email-jack@suse.cz> <20160721065526.GB27776@eguan.usersys.redhat.com> <20160721073507.GB7220@quack2.suse.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160721073507.GB7220@quack2.suse.cz> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Thu 21-07-16 09:35:07, Jan Kara wrote: > On Thu 21-07-16 14:55:26, Eryu Guan wrote: > > On Thu, Jul 21, 2016 at 08:17:36AM +0200, Jan Kara wrote: > > > 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 > > > --- > > > common/filter | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/common/filter b/common/filter > > > index b229a97dfa0e..37f07c8ca1ac 100644 > > > --- a/common/filter > > > +++ b/common/filter > > > @@ -221,7 +221,7 @@ 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)/" > > > + sed -e "s/[0-9/.]* [GMKiBbytes]*, [0-9]* ops\; [0-9/:. sec]* ([infnan0-9/.]* [EPGMKiBbytes]*\/sec and [infnan0-9/.]* ops\/sec)/XXX Bytes, X ops\; XX:XX:XX.X (XXX YYY\/sec and XXX ops\/sec)/" > > > > Seems adding only 'a' to the char set is sufficient, 'n' is already in > > the set, i.e. > > > > - ...([inf0-9/.]* ... > > + ...([infa0-9/.]* ... > > Yeah. I've added 'nan' to document what the letters are there for. But > probably I should have added just 'a' and added a comment. I'll respin the > patch. Attached is a revised patch. Honza From 8d86c6fe36040e21db3475292a2dd05a280f158f Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Thu, 21 Jul 2016 08:15:19 +0200 Subject: [PATCH] generic/130: 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 --- common/filter | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/filter b/common/filter index b229a97dfa0e..f80cd562af71 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() -- 2.6.6