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

Unified Diff: dashboard/dashboard/pinpoint/models/job.py

Issue 3001163002: Pinpoint - Surface info from executions for display in UI. (Closed)
Patch Set: Created 3 years, 4 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: dashboard/dashboard/pinpoint/models/job.py
diff --git a/dashboard/dashboard/pinpoint/models/job.py b/dashboard/dashboard/pinpoint/models/job.py
index 89aae0d5f4c1b1be12f44cc6e445832770a860fa..eae2b6dd336feacbc5b6dfc8fa31944937c4515f 100644
--- a/dashboard/dashboard/pinpoint/models/job.py
+++ b/dashboard/dashboard/pinpoint/models/job.py
@@ -270,11 +270,23 @@ class _JobState(object):
result_values.append(change_result_values)
+ execution_details = []
dtu 2017/08/21 23:52:52 I don't see a clear advantage of this format over
shatch 2017/08/22 01:23:55 Done.
+ for change in self._changes:
+ change_results_per_quest = _CombineExecutionDetailsPerQuest(
+ self._attempts[change])
+
+ change_result_values = []
+ for quest in self._quests:
+ change_result_values.append(change_results_per_quest[quest])
+
+ execution_details.append(change_result_values)
+
return {
'quests': map(str, self._quests),
'changes': map(str, self._changes),
'comparisons': comparisons,
'result_values': result_values,
+ 'execution_details': execution_details,
dtu 2017/08/21 23:52:52 nit: executions
}
def _Compare(self, change_a, change_b):
@@ -313,6 +325,15 @@ def _CombineResultsPerQuest(attempts):
return aggregate_results
+def _CombineExecutionDetailsPerQuest(attempts):
+ aggregate_results = collections.defaultdict(list)
+ for attempt in attempts:
+ for quest, results in attempt.AsDictPerQuest().iteritems():
+ aggregate_results[quest].append(results)
+
+ return aggregate_results
+
+
def _CompareResults(results_a, results_b):
if len(results_a) == 0 or len(results_b) == 0:
return _UNKNOWN

Powered by Google App Engine
This is Rietveld 408576698