From ac00a280e6b1f7d69d8dbc37f96145624c650b88 Mon Sep 17 00:00:00 2001 From: Yujun Zhang Date: Sat, 30 Sep 2017 14:42:53 +0800 Subject: Fix status reporting page - use data in last 10 days instead of 1 day - hide installers without any data - remove redundant qtip reporting Change-Id: If73a439572b6a1cf09c7d34f643fb14be82196ca Signed-off-by: Yujun Zhang --- reporting/docker/reporting.sh | 2 -- reporting/reporting/qtip/reporting-status.py | 19 +++++++------------ .../reporting/qtip/template/index-status-tmpl.html | 8 ++++---- reporting/reporting/reporting.yaml | 2 +- 4 files changed, 12 insertions(+), 19 deletions(-) diff --git a/reporting/docker/reporting.sh b/reporting/docker/reporting.sh index 25d3ef1..2cb438d 100755 --- a/reporting/docker/reporting.sh +++ b/reporting/docker/reporting.sh @@ -59,8 +59,6 @@ if [ -z "$1" ]; then report_project $i $i "status" sleep 5 done - report_project "QTIP" "qtip" "status" - echo "Functest reporting vIMS..." report_project "functest" "functest" "vims" diff --git a/reporting/reporting/qtip/reporting-status.py b/reporting/reporting/qtip/reporting-status.py index 56f9e0a..524338c 100644 --- a/reporting/reporting/qtip/reporting-status.py +++ b/reporting/reporting/qtip/reporting-status.py @@ -45,27 +45,22 @@ def prepare_profile_file(version): def profile_results(results, installer, profile_fd): result_criterias = {} for s_p, s_p_result in results.iteritems(): - ten_criteria = len(s_p_result) - ten_score = sum(s_p_result) + avg_last_ten = sum([int(s) for s in s_p_result]) / len(s_p_result) LASTEST_TESTS = rp_utils.get_config( 'general.nb_iteration_tests_success_criteria') - four_result = s_p_result[:LASTEST_TESTS] - four_criteria = len(four_result) - four_score = sum(four_result) - - s_four_score = str(four_score / four_criteria) - s_ten_score = str(ten_score / ten_criteria) + last_four = s_p_result[-LASTEST_TESTS:] + avg_last_four = sum([int(s) for s in last_four]) / len(last_four) info = '{},{},{},{},{}\n'.format(reportingDate, s_p, installer, - s_ten_score, - s_four_score) + '', + avg_last_four) profile_fd.write(info) result_criterias[s_p] = sr.ScenarioResult('OK', - s_four_score, - s_ten_score, + avg_last_four, + avg_last_ten, '100') logger.info("--------------------------") diff --git a/reporting/reporting/qtip/template/index-status-tmpl.html b/reporting/reporting/qtip/template/index-status-tmpl.html index 92f3395..da8424a 100644 --- a/reporting/reporting/qtip/template/index-status-tmpl.html +++ b/reporting/reporting/qtip/template/index-status-tmpl.html @@ -47,10 +47,10 @@ diff --git a/reporting/reporting/reporting.yaml b/reporting/reporting/reporting.yaml index dae832a..2a4aa49 100644 --- a/reporting/reporting/reporting.yaml +++ b/reporting/reporting/reporting.yaml @@ -56,7 +56,7 @@ storperf: qtip: log_level: ERROR - period: 1 + period: 10 bottlenecks: test_list: -- cgit 1.2.3-korg