summaryrefslogtreecommitdiffstats
path: root/utils/test/result_collection_api/dashboard/functest2Dashboard.py
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-02-11 16:20:49 +0100
committerMorgan Richomme <morgan.richomme@orange.com>2016-02-11 16:20:49 +0100
commit3b58a9cefb543d1a6ef8404dbe6690b53748a32f (patch)
treef2424e932fd0622300818e081d8b1be0d7db17ff /utils/test/result_collection_api/dashboard/functest2Dashboard.py
parentdc5bb9cb2a59aeeede763f988f1559ac4e2ba8c2 (diff)
Add Rally summary and Doctor for visualization
Change-Id: I23ff748237511f89417d2c60e22fb79949ac90b7 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'utils/test/result_collection_api/dashboard/functest2Dashboard.py')
-rw-r--r--utils/test/result_collection_api/dashboard/functest2Dashboard.py30
1 files changed, 28 insertions, 2 deletions
diff --git a/utils/test/result_collection_api/dashboard/functest2Dashboard.py b/utils/test/result_collection_api/dashboard/functest2Dashboard.py
index a817f7597..3f4e1a2db 100644
--- a/utils/test/result_collection_api/dashboard/functest2Dashboard.py
+++ b/utils/test/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
-