Added apollo data to harness.

Reviewers: dgleich, teon.banek, buda

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D963
This commit is contained in:
Matej Ferencevic 2017-11-07 18:46:13 +01:00
parent c5dc189c7a
commit 0ae88bc06b
2 changed files with 13 additions and 0 deletions

1
.gitignore vendored
View File

@ -27,3 +27,4 @@ ve/
ve3/
perf.data*
TAGS
*.apollo_data

View File

@ -271,6 +271,18 @@ def main():
with open(get_absolute_path(".harness_summary"), "w") as f:
print(suite.summary, file=f)
# Export data points.
with open(get_absolute_path(".apollo_data"), "w") as f:
apollo_data = ""
data = list(filter(lambda x: x.strip(), suite.summary.split("\n")))
headers = data[0].strip().split()
for row in data[1:]:
row = row.strip().split()
group, scenario = row[0:2]
for header, value in zip(headers[2:], row[2:]):
apollo_data += "{}.{}.{} {}\n".format(group, scenario, header, value)
f.write(apollo_data)
if __name__ == "__main__":
main()