summaryrefslogtreecommitdiffstats
path: root/result_collection_api
diff options
context:
space:
mode:
authorMatthewLi <matthew.lijun@huawei.com>2016-02-19 03:27:14 -0500
committerMatthewLi <matthew.lijun@huawei.com>2016-02-19 03:40:53 -0500
commit4ae43cbb30e2727987905549b805b8f6e0753e4e (patch)
tree41d1c4f36cbd3d7e6dba1624c322cb91a00496d8 /result_collection_api
parente653c908cb965ee44ed108ea27fb3d848e9d3b75 (diff)
bottlenecks: rewrite the rubbos graph drawing function
JIRA: BOTTLENECK-30 Change-Id: Iee2e177b7ddec5c0e0a765d5a7369ec76e6ad911 Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
Diffstat (limited to 'result_collection_api')
-rwxr-xr-xresult_collection_api/dashboard/bottlenecks2Dashboard.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/result_collection_api/dashboard/bottlenecks2Dashboard.py b/result_collection_api/dashboard/bottlenecks2Dashboard.py
index 8d5326e..6f7679d 100755
--- a/result_collection_api/dashboard/bottlenecks2Dashboard.py
+++ b/result_collection_api/dashboard/bottlenecks2Dashboard.py
@@ -77,6 +77,27 @@ def format_rubbos_for_dashboard(results):
'data_set': new_element})
return test_data
+def format_rubbos_probe_for_dashboard(results):
+ """
+ Post processing for the Rubbos test case of one time
+ """
+ test_data = [{'description': 'Rubbos results'}]
+
+ element = []
+ latest_result = results[-1]["details"]
+ for key in sorted(lastest_result):
+ throughput = latest_result[key]["throughput"]
+ client_num = int(key)
+ element.append({'x': client_num,
+ 'y': throughput})
+ #graph
+ test_data.append({'name': "Rubbos throughput vs client number",
+ 'info': {'type': "graph",
+ 'xlabel': 'client number',
+ 'ylabel': 'throughput'},
+ 'data_set': element})
+
+ return test_data
def format_tu1_for_dashboard(results):
test_data = [{'description': 'Tu-1 performance result'}]
@@ -165,7 +186,7 @@ def _get_results(db_url, test_criteria):
def _test():
db_url = "http://213.77.62.197"
results = _get_results(db_url, {"project": "bottlenecks", "testcase": "rubbos"})
- test_result = format_rubbos_for_dashboard(results)
+ test_result = format_rubbos_probe_for_dashboard(results)
print json.dumps(test_result, indent=4)
results = _get_results(db_url, {"project": "bottlenecks", "testcase": "tu1"})