Code Review
/
integration
/
test.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Step 1: Move vm scripts to the right place
[integration/test.git]
/
test
/
tools
/
odl-mdsal-clustering-tests
/
clustering-performance-test
/
create_plot_data_files.py
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 1719defa4f794aa62a8d545925ae99c1eadc136e..7971394e61158d09ef485cdd0ada7929157c75b5 100644
(file)
--- 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
#!/usr/bin/python
+import re
text_file = open("out.log.txt", "r")
log = text_file.read()
text_file = open("out.log.txt", "r")
log = text_file.read()
@@
-6,10
+7,12
@@
text_file.close()
data = []
data = []
+pat = re.compile(r'Avg. requests/s: (?P<rate1>[0-9,\.]+) OK, (?P<rate2>[0-9,\.]+) Total')
+
for line in log.splitlines():
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")
print data
text_file = open("rates.csv", "w")