Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Unified Diff: appengine/findit/handlers/flake/check_flake.py

Issue 2369333002: [Findit] Capture versionized metadata for master_flake_analysis (Closed)
Patch Set: Fixing nits Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | appengine/findit/handlers/flake/test/check_flake_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/handlers/flake/check_flake.py
diff --git a/appengine/findit/handlers/flake/check_flake.py b/appengine/findit/handlers/flake/check_flake.py
index 9601628ea826947a7c0eb164c0246af91256eb5b..ef4f6aebdb51eaf588926c7d88d9436c92259a2d 100644
--- a/appengine/findit/handlers/flake/check_flake.py
+++ b/appengine/findit/handlers/flake/check_flake.py
@@ -44,7 +44,7 @@ class CheckFlake(BaseHandler):
}
data = {
- 'success_rates': [],
+ 'pass_rates': [],
'analysis_status': STATUS_TO_DESCRIPTION.get(
master_flake_analysis.status),
'suspected_flake_build_number': (
@@ -55,11 +55,19 @@ class CheckFlake(BaseHandler):
'step_name': step_name,
'test_name': test_name,
}
- zipped = zip(master_flake_analysis.build_numbers,
- master_flake_analysis.success_rates)
- zipped.sort(key = lambda x: x[0])
- for (build_number, success_rate) in zipped:
- data['success_rates'].append([build_number, success_rate])
+
+ build_numbers = []
+ pass_rates = []
+ coordinates = []
+
+ for data_point in master_flake_analysis.data_points:
+ coordinates.append((data_point.build_number, data_point.pass_rate))
+
+ # Order by build number from earliest to latest.
+ coordinates.sort(key=lambda x: x[0])
+
+ data['pass_rates'] = coordinates
+
return {
'template': 'flake/result.html',
'data': data
« no previous file with comments | « no previous file | appengine/findit/handlers/flake/test/check_flake_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698