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

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

Issue 2369333002: [Findit] Capture versionized metadata for master_flake_analysis (Closed)
Patch Set: Addressing comments 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
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..efb3fb73e0e8324a57ff59d65748af483828d3ac 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 = []
+
+ for data_point in master_flake_analysis.data_points:
+ build_numbers.append(data_point.build_number)
+ pass_rates.append(data_point.pass_rate)
+
+ zipped = zip(build_numbers, pass_rates)
stgao 2016/10/01 01:36:59 Build the list directly in the for loop above.
lijeffrey 2016/10/01 02:51:45 Done.
+ zipped.sort(key=lambda x: x[0])
+
+ for (build_number, pass_rate) in zipped:
+ data['pass_rates'].append([build_number, pass_rate])
return {
'template': 'flake/result.html',
'data': data

Powered by Google App Engine
This is Rietveld 408576698