From: Peter Gubka Date: Tue, 5 May 2015 08:35:58 +0000 (+0200) Subject: changes for parsing the new output format X-Git-Tag: release/lithium~105 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=70e44bfdb0b8041af20992fd9336345730d104c6;p=integration%2Ftest.git changes for parsing the new output format these changes were triggered by https://git.opendaylight.org/gerrit/#/c/19494/ Change-Id: Iec3e1fb6775021c3b7cfa1b4a1a8bffbbaafb1eb Signed-off-by: Peter Gubka --- diff --git a/test/tools/odl-mdsal-clustering-tests/clustering-performance-test/create_plot_data_files.py b/test/tools/odl-mdsal-clustering-tests/clustering-performance-test/create_plot_data_files.py index 1719defa4f..7971394e61 100644 --- a/test/tools/odl-mdsal-clustering-tests/clustering-performance-test/create_plot_data_files.py +++ b/test/tools/odl-mdsal-clustering-tests/clustering-performance-test/create_plot_data_files.py @@ -1,4 +1,5 @@ #!/usr/bin/python +import re text_file = open("out.log.txt", "r") log = text_file.read() @@ -6,10 +7,12 @@ text_file.close() data = [] +pat = re.compile(r'Avg. requests/s: (?P[0-9,\.]+) OK, (?P[0-9,\.]+) Total') + for line in log.splitlines(): - if 'Total success rate: ' in line: - ll = line.split(',') - data.append(ll[0][24:]) + res = pat.search(line) + if res is not None: + data.append(res.groups('rate1')[0]) print data text_file = open("rates.csv", "w")