diff options
author | Morgan Richomme <morgan.richomme@orange.com> | 2016-02-11 16:20:49 +0100 |
---|---|---|
committer | Morgan Richomme <morgan.richomme@orange.com> | 2016-02-11 16:20:49 +0100 |
commit | 19b6c7d2cae439558a2b64ee8db4b90b27fb739a (patch) | |
tree | 1ec7dd084eac30a9b3f8a4f9ab1d17d518d0b764 /result_collection_api/dashboard/functest2Dashboard.py | |
parent | 91be0e27b95b0771a97c12501909d4ae5c2fff4b (diff) |
Add Rally summary and Doctor for visualization
Change-Id: I23ff748237511f89417d2c60e22fb79949ac90b7
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'result_collection_api/dashboard/functest2Dashboard.py')
-rw-r--r-- | result_collection_api/dashboard/functest2Dashboard.py | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/result_collection_api/dashboard/functest2Dashboard.py b/result_collection_api/dashboard/functest2Dashboard.py index a817f75..3f4e1a2 100644 --- a/result_collection_api/dashboard/functest2Dashboard.py +++ b/result_collection_api/dashboard/functest2Dashboard.py @@ -14,8 +14,8 @@ # a new method format_<Test_case>_for_dashboard(results) # v0.1: basic example with methods for odl, Tempest, Rally and vPing # -import re import datetime +import re def get_functest_cases(): @@ -343,6 +343,33 @@ def format_Rally_for_dashboard(results): Post processing for the Rally test case """ test_data = [{'description': 'Rally results for Dashboard'}] + # Graph 1: Test_Duration = f(time) + # ******************************** + new_element = [] + for data in results: + summary_cursor = len(data) + new_element.append({'x': data['creation_date'], + 'y': int(data['details'][summary_cursor]['summary']['duration'])}) + + test_data.append({'name': "rally duration", + 'info': {'type': "graph", + 'xlabel': 'time', + 'ylabel': 'duration (s)'}, + 'data_set': new_element}) + + # Graph 2: Success rate = f(time) + # ******************************** + new_element = [] + for data in results: + new_element.append({'x': data['creation_date'], + 'y': float(data['details'][summary_cursor]['summary']['nb success'])}) + + test_data.append({'name': "rally success rate", + 'info': {'type': "graph", + 'xlabel': 'time', + 'ylabel': 'success rate (%)'}, + 'data_set': new_element}) + return test_data @@ -418,4 +445,3 @@ def format_vPing_userdata_for_dashboard(results): 'Nb Success': nbTestOk}]}) return test_data - |