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

Unified Diff: dashboard/dashboard/pinpoint/models/quest/read_value.py

Issue 2996473002: [pinpoint] Add QuestGenerator object. (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/quest/read_value.py
diff --git a/dashboard/dashboard/pinpoint/models/quest/read_value.py b/dashboard/dashboard/pinpoint/models/quest/read_value.py
index 5ed457872948321c8e18cd79ce226e4a560663c7..6ed1a41a3659ff3752964ebf343381bbe1ad4cc4 100644
--- a/dashboard/dashboard/pinpoint/models/quest/read_value.py
+++ b/dashboard/dashboard/pinpoint/models/quest/read_value.py
@@ -9,23 +9,28 @@ from dashboard.pinpoint.models.quest import quest
from dashboard.services import isolate_service
-class ReadValue(quest.Quest):
+class ReadChartJsonValue(quest.Quest):
def __init__(self, metric, test):
self._metric = metric
self._test = test
+ def __eq__(self, other):
+ return (isinstance(other, self.__class__) and
perezju 2017/08/07 12:06:12 nit: prefer type(self) over self.__class__
dtu 2017/08/15 17:06:41 Done.
+ self._metric == other._metric and
+ self._test == other._test)
+
def __str__(self):
return 'Value of ' + self._metric
def Start(self, isolate_hash):
- return _ReadValueExecution(self._metric, self._test, isolate_hash)
+ return _ReadChartJsonValueExecution(self._metric, self._test, isolate_hash)
-class _ReadValueExecution(execution.Execution):
+class _ReadChartJsonValueExecution(execution.Execution):
def __init__(self, metric, test, isolate_hash):
- super(_ReadValueExecution, self).__init__()
+ super(_ReadChartJsonValueExecution, self).__init__()
self._metric = metric
self._test = test or 'summary'
self._isolate_hash = isolate_hash

Powered by Google App Engine
This is Rietveld 408576698