Re: [Fuego] [PATCH 1/1] fio/parser.py: Add support to parse later versions of fio 2.16
"Bird, Tim" <[email protected]> Thu, 14 Apr 2022 21:48:00 +0000
| Newsgroups | dev.linux.lists.fuego |
|---|---|
| Message-ID | <BYAPR13MB2503F6D4E1D30E5156290C87FDEF9@BYAPR13MB2503.namprd13.prod.outlook.com> |
See comments inline below. > -----Original Message----- > From: [email protected] <[email protected]= m> >=20 > From: sireesha <[email protected]> >=20 > The existing parser.py file works for fio version 2.0.8 which is the > test version defined and used in fuego tests. >=20 > 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. >=20 > 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 >=20 > diff --git a/tests/Benchmark.fio/parser.py b/tests/Benchmark.fio/parser.p= y > 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 >=20 > -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)' > + 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. This test doesn't have logic that detects and uses a different version of t= he 'fio' binary if it is already on the board. Do you have other changes to t= his test to go along with the parse change? If so, please send them. > measurements =3D {} >=20 > # 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 change= s to simplify the search strings and the groups. This is applied and pushed, as it future-proofs the parser - which is a good 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 mainline doesn't handle that. -- Tim