Code Review
/
releng.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Bug fix:Bottlenecks job failed."
[releng.git]
/
utils
/
test
/
reporting
/
reporting
/
qtip
/
reporting-status.py
diff --git
a/utils/test/reporting/reporting/qtip/reporting-status.py
b/utils/test/reporting/reporting/qtip/reporting-status.py
index
f0127b5
..
524338c
100644
(file)
--- a/
utils/test/reporting/reporting/qtip/reporting-status.py
+++ b/
utils/test/reporting/reporting/qtip/reporting-status.py
@@
-33,8
+33,7
@@
def prepare_profile_file(version):
if not os.path.exists(profile_dir):
os.makedirs(profile_dir)
if not os.path.exists(profile_dir):
os.makedirs(profile_dir)
- profile_file = "{}/{}/scenario_history.txt".format(profile_dir,
- version)
+ profile_file = "{}/scenario_history.txt".format(profile_dir)
if not os.path.exists(profile_file):
with open(profile_file, 'w') as f:
info = 'date,scenario,installer,details,score\n'
if not os.path.exists(profile_file):
with open(profile_file, 'w') as f:
info = 'date,scenario,installer,details,score\n'
@@
-46,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():
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')
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,
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',
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("--------------------------")
'100')
logger.info("--------------------------")