diff options
author | 2017-08-04 17:09:00 +0800 | |
---|---|---|
committer | 2017-08-07 09:35:00 +0000 | |
commit | 205156554daf981d01c4f43c6a79f6519525916e (patch) | |
tree | ed08da8cebd31eacb684c4a7f5256e9c065ba043 /testsuites/posca/testcase_dashboard | |
parent | 3592f9016821a603930ebda7f4112abf732e6750 (diff) |
system bandwidth testcase frame rebuild
JIRA: BOTTLENECK-177
This patch will debug some error in system bandwidth testcase.
use the new docker way to test this testcase.
Bug fix about dashboard and test framework.
Change-Id: I7167ffd75efab9a7780407aa5b9a4337ebb9b4c7
Signed-off-by: liyin <liyin11@huawei.com>
Diffstat (limited to 'testsuites/posca/testcase_dashboard')
6 files changed, 60 insertions, 35 deletions
diff --git a/testsuites/posca/testcase_dashboard/posca_system_bandwidth_dashboard.json b/testsuites/posca/testcase_dashboard/posca_system_bandwidth_dashboard.json index 3ef86b72..2dc640b6 100644 --- a/testsuites/posca/testcase_dashboard/posca_system_bandwidth_dashboard.json +++ b/testsuites/posca/testcase_dashboard/posca_system_bandwidth_dashboard.json @@ -1,12 +1,13 @@ { - "title": "system_bandwidth_dashboard", - "hits": 0, - "description": "", - "panelsJSON": "[{\"id\":\"system_bandwidth_line-char\",\"type\":\"visualization\",\"panelIndex\":3,\"size_x\":7,\"size_y\":4,\"col\":1,\"row\":1},{\"id\":\"system_bandwidth_line-date\",\"type\":\"visualization\",\"panelIndex\":4,\"size_x\":7,\"size_y\":4,\"col\":1,\"row\":5},{\"id\":\"system_bandwidth_terms_data\",\"type\":\"visualization\",\"panelIndex\":5,\"size_x\":5,\"size_y\":8,\"col\":8,\"row\":1}]", - "optionsJSON": "{\"darkTheme\":false}", - "uiStateJSON": "{}", - "version": 1, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"filter\":[{\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}}}]}" - } + "title": "system_bandwidth_dashboard", + "hits": 0, + "description": "", + "panelsJSON": "[{\"col\":1,\"id\":\"system_bandwidth_line-char\",\"panelIndex\":3,\"row\":1,\"size_x\":7,\"size_y\":3,\"type\":\"visualization\"},{\"col\":1,\"id\":\"system_bandwidth_line-date\",\"panelIndex\":4,\"row\":4,\"size_x\":7,\"size_y\":3,\"type\":\"visualization\"},{\"col\":8,\"id\":\"system_bandwidth_terms_data\",\"panelIndex\":5,\"row\":1,\"size_x\":5,\"size_y\":9,\"type\":\"visualization\"},{\"id\":\"system_bandwidth_local_cpu\",\"type\":\"visualization\",\"panelIndex\":7,\"size_x\":7,\"size_y\":3,\"col\":1,\"row\":7}]", + "optionsJSON": "{\"darkTheme\":false}", + "uiStateJSON": "{}", + "version": 1, + "timeRestore": false, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[{\"query\":{\"query_string\":{\"analyze_wildcard\":true,\"query\":\"*\"}}}]}" + } } diff --git a/testsuites/posca/testcase_dashboard/posca_system_bandwidth_line_char.json b/testsuites/posca/testcase_dashboard/posca_system_bandwidth_line_char.json index 13acf16b..828c2292 100644 --- a/testsuites/posca/testcase_dashboard/posca_system_bandwidth_line_char.json +++ b/testsuites/posca/testcase_dashboard/posca_system_bandwidth_line_char.json @@ -1,10 +1,10 @@ { - "title": "system_bandwidth_line-char", - "visState": "{\"title\":\"system_bandwidth_line-char\",\"type\":\"line\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"showCircles\":true,\"smoothLines\":false,\"interpolate\":\"linear\",\"scale\":\"linear\",\"drawLinesBetweenPoints\":true,\"radiusRatio\":9,\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false,\"yAxis\":{}},\"aggs\":[{\"id\":\"1\",\"type\":\"sum\",\"schema\":\"metric\",\"params\":{\"field\":\"throughput\"}},{\"id\":\"2\",\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"rx_msg_size\",\"size\":30,\"order\":\"asc\",\"orderBy\":\"_term\"}},{\"id\":\"3\",\"type\":\"terms\",\"schema\":\"group\",\"params\":{\"field\":\"tx_msg_size\",\"size\":30,\"order\":\"desc\",\"orderBy\":\"_term\"}}],\"listeners\":{}}", - "uiStateJSON": "{}", - "description": "", - "version": 1, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"index\":\"bottlenecks\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}" - } + "visState": "{\"title\":\"system_bandwidth_line-char\",\"type\":\"line\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"showCircles\":true,\"smoothLines\":false,\"interpolate\":\"linear\",\"scale\":\"linear\",\"drawLinesBetweenPoints\":true,\"radiusRatio\":9,\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false,\"yAxis\":{}},\"aggs\":[{\"id\":\"1\",\"type\":\"sum\",\"schema\":\"metric\",\"params\":{\"field\":\"throughput\"}},{\"id\":\"2\",\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"rx_msg_size\",\"size\":30,\"order\":\"asc\",\"orderBy\":\"_term\"}},{\"id\":\"3\",\"type\":\"terms\",\"schema\":\"group\",\"params\":{\"field\":\"tx_msg_size\",\"size\":30,\"order\":\"desc\",\"orderBy\":\"_term\"}}],\"listeners\":{}}", + "description": "", + "title": "system_bandwidth_line-char", + "uiStateJSON": "{}", + "version": 1, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"index\":\"bottlenecks\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}" + } } diff --git a/testsuites/posca/testcase_dashboard/posca_system_bandwidth_line_data.json b/testsuites/posca/testcase_dashboard/posca_system_bandwidth_line_data.json index 8a98ce9b..c13cadca 100644 --- a/testsuites/posca/testcase_dashboard/posca_system_bandwidth_line_data.json +++ b/testsuites/posca/testcase_dashboard/posca_system_bandwidth_line_data.json @@ -1,10 +1,10 @@ { - "title": "system_bandwidth_line-date", - "visState": "{\"title\":\"system_bandwidth_line-date\",\"type\":\"line\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"showCircles\":true,\"smoothLines\":false,\"interpolate\":\"linear\",\"scale\":\"linear\",\"drawLinesBetweenPoints\":true,\"radiusRatio\":9,\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false,\"yAxis\":{}},\"aggs\":[{\"id\":\"1\",\"type\":\"sum\",\"schema\":\"metric\",\"params\":{\"field\":\"throughput\"}},{\"id\":\"2\",\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"time\",\"size\":100,\"order\":\"asc\",\"orderBy\":\"_term\"}},{\"id\":\"3\",\"type\":\"sum\",\"schema\":\"metric\",\"params\":{\"field\":\"rx_msg_size\"}}],\"listeners\":{}}", - "uiStateJSON": "{}", - "description": "", - "version": 1, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"index\":\"bottlenecks\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}" - } + "title": "system_bandwidth_line-date", + "visState": "{\"aggs\":[{\"id\":\"1\",\"params\":{\"field\":\"mean_latency\"},\"schema\":\"metric\",\"type\":\"sum\"},{\"id\":\"2\",\"params\":{\"field\":\"rx_msg_size\",\"order\":\"asc\",\"orderBy\":\"_term\",\"size\":100},\"schema\":\"segment\",\"type\":\"terms\"},{\"id\":\"4\",\"params\":{\"field\":\"tx_msg_size\",\"order\":\"asc\",\"orderBy\":\"1\",\"size\":100},\"schema\":\"group\",\"type\":\"terms\"}],\"listeners\":{},\"params\":{\"addLegend\":true,\"addTimeMarker\":false,\"addTooltip\":true,\"defaultYExtents\":false,\"drawLinesBetweenPoints\":true,\"interpolate\":\"linear\",\"radiusRatio\":9,\"scale\":\"linear\",\"setYExtents\":false,\"shareYAxis\":true,\"showCircles\":true,\"smoothLines\":false,\"times\":[],\"yAxis\":{}},\"title\":\"system_bandwidth_line-date\",\"type\":\"line\"}", + "uiStateJSON": "{}", + "description": "", + "version": 1, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"index\":\"bottlenecks\",\"query\":{\"query_string\":{\"analyze_wildcard\":true,\"query\":\"*\"}},\"filter\":[]}" + } } diff --git a/testsuites/posca/testcase_dashboard/posca_system_bandwidth_local_cpu.json b/testsuites/posca/testcase_dashboard/posca_system_bandwidth_local_cpu.json new file mode 100644 index 00000000..46724da6 --- /dev/null +++ b/testsuites/posca/testcase_dashboard/posca_system_bandwidth_local_cpu.json @@ -0,0 +1,11 @@ +{ + "title": "posca_system_bandwidth_local_cpu", + "visState": "{\"title\":\"New Visualization\",\"type\":\"line\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"showCircles\":true,\"smoothLines\":false,\"interpolate\":\"linear\",\"scale\":\"linear\",\"drawLinesBetweenPoints\":true,\"radiusRatio\":9,\"times\":[],\"addTimeMarker\":false,\"defaultYExtents\":false,\"setYExtents\":false,\"yAxis\":{}},\"aggs\":[{\"id\":\"1\",\"type\":\"sum\",\"schema\":\"metric\",\"params\":{\"field\":\"local_cpu_util\"}},{\"id\":\"2\",\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"rx_msg_size\",\"size\":100,\"order\":\"asc\",\"orderBy\":\"_term\"}},{\"id\":\"3\",\"type\":\"terms\",\"schema\":\"group\",\"params\":{\"field\":\"tx_msg_size\",\"size\":100,\"order\":\"asc\",\"orderBy\":\"_term\"}}],\"listeners\":{}}", + "uiStateJSON": "{}", + "description": "", + "savedSearchId": "system_bandwidth", + "version": 1, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[]}" + } +} diff --git a/testsuites/posca/testcase_dashboard/posca_system_bandwidth_terms_data.json b/testsuites/posca/testcase_dashboard/posca_system_bandwidth_terms_data.json index 5e8e787b..2e6666a1 100644 --- a/testsuites/posca/testcase_dashboard/posca_system_bandwidth_terms_data.json +++ b/testsuites/posca/testcase_dashboard/posca_system_bandwidth_terms_data.json @@ -1,10 +1,10 @@ { - "title": "system_bandwidth_terms_data", - "visState": "{\"title\":\"system_bandwidth_terms_data\",\"type\":\"table\",\"params\":{\"perPage\":80,\"showPartialRows\":false,\"showMeticsAtAllLevels\":false},\"aggs\":[{\"id\":\"1\",\"type\":\"sum\",\"schema\":\"metric\",\"params\":{\"field\":\"throughput\"}},{\"id\":\"4\",\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"tx_msg_size\",\"size\":200,\"order\":\"asc\",\"orderBy\":\"_term\"}},{\"id\":\"5\",\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"rx_msg_size\",\"size\":200,\"order\":\"asc\",\"orderBy\":\"_term\"}},{\"id\":\"6\",\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"mean_latency\",\"size\":5,\"order\":\"asc\",\"orderBy\":\"_term\"}},{\"id\":\"7\",\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"local_cpu_util\",\"size\":20,\"order\":\"desc\",\"orderBy\":\"_term\"}},{\"id\":\"8\",\"type\":\"terms\",\"schema\":\"bucket\",\"params\":{\"field\":\"remote_cpu_util\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"_term\"}}],\"listeners\":{}}", - "uiStateJSON": "{}", - "description": "", - "version": 1, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"index\":\"bottlenecks\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}" - } + "title": "system_bandwidth_terms_data", + "visState": "{\"aggs\":[{\"id\":\"1\",\"params\":{\"field\":\"throughput\"},\"schema\":\"metric\",\"type\":\"sum\"},{\"id\":\"4\",\"params\":{\"field\":\"local_cpu_util\"},\"schema\":\"metric\",\"type\":\"sum\"},{\"id\":\"2\",\"params\":{\"field\":\"tx_msg_size\",\"order\":\"asc\",\"orderBy\":\"_term\",\"size\":100},\"schema\":\"bucket\",\"type\":\"terms\"},{\"id\":\"3\",\"params\":{\"field\":\"rx_msg_size\",\"order\":\"asc\",\"orderBy\":\"_term\",\"size\":100},\"schema\":\"bucket\",\"type\":\"terms\"},{\"id\":\"5\",\"params\":{\"field\":\"mean_latency\"},\"schema\":\"metric\",\"type\":\"sum\"},{\"id\":\"6\",\"params\":{\"field\":\"remote_cpu_util\"},\"schema\":\"metric\",\"type\":\"sum\"}],\"listeners\":{},\"params\":{\"perPage\":80,\"showMeticsAtAllLevels\":false,\"showPartialRows\":false},\"title\":\"system_bandwidth_terms_data\",\"type\":\"table\"}", + "uiStateJSON": "{}", + "description": "", + "version": 1, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"index\":\"bottlenecks\",\"query\":{\"query_string\":{\"analyze_wildcard\":true,\"query\":\"*\"}},\"filter\":[]}" + } } diff --git a/testsuites/posca/testcase_dashboard/system_bandwidth.py b/testsuites/posca/testcase_dashboard/system_bandwidth.py index 155ca2df..4501dee7 100755 --- a/testsuites/posca/testcase_dashboard/system_bandwidth.py +++ b/testsuites/posca/testcase_dashboard/system_bandwidth.py @@ -76,7 +76,6 @@ def dashboard_system_bandwidth(runner_config): LOG.info("system_bandwidth search has existed") # Create testing data in line graph - # Create testing data in line graph with open(dashboard_dir + 'posca_system_bandwidth_line_data.json')\ as line_data: doc = json.load(line_data) @@ -104,6 +103,20 @@ def dashboard_system_bandwidth(runner_config): else: LOG.info("system_bandwidth_line-char visualization has existed") + # Create local cpu results in line chart + with open(dashboard_dir + 'posca_system_bandwidth_local_cpu.json')\ + as line_cpu: + doc = json.load(line_cpu) + res = es.index( + index=".kibana", + doc_type="visualization", + id="system_bandwidth_local_cpu", + body=doc) + if res['created'] == "True": + LOG.info("system_bandwidth_local_cpu visualization has created") + else: + LOG.info("system_bandwidth_local_cpu visualization has existed") + # Create monitoring data in table with open(dashboard_dir + 'posca_system_bandwidth_terms_data.json')\ as terms_char: |