Re: [Fuego] [PATCH 1/1] fio/parser.py: Add support to parse later versions of fio 2.16

<[email protected]> Mon, 18 Apr 2022 11:05:34 +0000
Newsgroups dev.linux.lists.fuego
Message-ID <TYCPR01MB60954ED673C4D28E79025740B3F39@TYCPR01MB6095.jpnprd01.prod.outlook.com>
Thank you for applying the changes.

Please find the comments inline below

> -----Original Message-----
> From: Bird, Tim <[email protected]>
> Sent: Friday, April 15, 2022 3:18 AM
> To: nakkala sireesha(=1B$B#T#S#I#P=1B(B) <[email protected]=
om>
> Cc: [email protected]; dinesh kumar(=1B$B#T#S#I#P=1B(B)
> <[email protected]>; hayashi kazuhiro(=1B$BNS=1B(B =1B$BOB9(=
=1B(B =1B$B""#S#W#C"~#A#C=1B(B
> =1B$B#T=1B(B) <[email protected]>; pyla venkata(=1B$B#T#S#I=
#P=1B(B)
> <[email protected]>
> Subject: RE: [PATCH 1/1] fio/parser.py: Add support to parse later versio=
ns of
> fio 2.16
>=20
> See comments inline below.
>=20
> > -----Original Message-----
> > From: [email protected]
> > <[email protected]>
> >
> > From: sireesha <[email protected]>
> >
> > The existing parser.py file works for fio version 2.0.8 which is the
> > test version defined and used in fuego tests.
> >
> > As fio output has changed from 2.16 version, to use fio with fuego the
> > parser is modified to parse the output of fio version 2.0.8 and later
> > versions of 2.16.
> >
> > Signed-off-by: sireesha <[email protected]>
> > Signed-off-by: venkata pyla <[email protected]>
> > ---
> >  tests/Benchmark.fio/parser.py | 15 ++++++++++++---
> >  1 file changed, 12 insertions(+), 3 deletions(-)  mode change 100755
> > =3D> 100644 tests/Benchmark.fio/parser.py
> >
> > diff --git a/tests/Benchmark.fio/parser.py
> > b/tests/Benchmark.fio/parser.py old mode 100755 new mode 100644
> index
> > 52a44e5..ab3ea34
> > --- a/tests/Benchmark.fio/parser.py
> > +++ b/tests/Benchmark.fio/parser.py
> > @@ -4,13 +4,22 @@
> >  import os, sys
> >  import common as plib
> >
> > -regex_string =3D '(  READ:|  WRITE:)(.*)(aggrb=3D)([\d.]+)([KM]B\/s)'
> > +test_version =3D ''
> > +with open(plib.TEST_LOG,'r') as cur_file:
> > +    raw_values =3D cur_file.readlines()
> > +    test_version =3D raw_values[4].rstrip("\n")
> > +
> > +if test_version > '2.16':
> > +    regex_string =3D '( READ:| WRITE:).*bw=3D.*\(([\d.]+)([kKM]B\/s)\)=
'
> > +else:
> > +    regex_string =3D '(  READ:|  WRITE:).*aggrb=3D([\d.]+)([KM]B\/s)'
> > +
>=20
> I'm a little confused about how you are executing an fio version greater =
than
> 2.0.8, which is the one installed by fuego_test.sh.
>
We are using the fio from Debian package system which is fio-3.25 version a=
nd that is pre-installed in the board,=20
so we wanted to update the parsing logic in the fuego-core to report the re=
sults correctly.

We contributing this to upstream so that it will be useful in future if the=
 fuego-core test are upgraded with later versions.

> This test doesn't have logic that detects and uses a different version of=
 the
> 'fio' binary if it is already on the board.  Do you have other changes to=
 this
> test to go along with the parse change?
>=20
Currently we don=1B$B!G=1B(Bt have any other changes, in future if we see a=
ny issue will share with you.

> If so, please send them.
>=20
> >  measurements =3D {}
> >
> >  # handle results in MB or KB
> >  def set_measure(tguid, match):
> > -    speed =3D match[3]
> > -    units =3D match[4]
> > +    speed =3D match[1]
> > +    units =3D match[2]
> >      multiplier =3D 1
> >      if units.startswith('M'):
> >          # WARNING - this depends on the value of kb_base specified to
> > --
> > 2.20.1
> >
>=20
> I'm OK with this parser change.  And thanks for making the requested
> changes to simplify the search strings and the groups.
>=20
> This is applied and pushed, as it future-proofs the parser - which is a g=
ood
> thing.  But it would be good to know how you are using this with other
> versions of the 'fio' binary, since the current test in fuego-core mainli=
ne
> doesn't handle that.
>=20
>  -- Tim