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

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

Issue 2996473002: [pinpoint] Add QuestGenerator object. (Closed)
Patch Set: rebase 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 b1dae7061f77e7b68449e39872257e09b804ecd9..89aae0d5f4c1b1be12f44cc6e445832770a860fa 100644
--- a/dashboard/dashboard/pinpoint/models/job.py
+++ b/dashboard/dashboard/pinpoint/models/job.py
@@ -13,7 +13,6 @@ from dashboard.common import utils
from dashboard.pinpoint import mann_whitney_u
from dashboard.pinpoint.models import attempt as attempt_module
from dashboard.pinpoint.models import change as change_module
-from dashboard.pinpoint.models import quest as quest_module
from dashboard.services import issue_tracker_service
@@ -58,10 +57,7 @@ class Job(ndb.Model):
exception = ndb.StringProperty()
# Request parameters.
- configuration = ndb.StringProperty(required=True)
- test_suite = ndb.StringProperty()
- test = ndb.StringProperty()
- metric = ndb.StringProperty()
+ arguments = ndb.JsonProperty(required=True)
# If True, the service should pick additional Changes to run (bisect).
# If False, only run the Changes explicitly added by the user.
@@ -74,21 +70,10 @@ class Job(ndb.Model):
state = ndb.PickleProperty(required=True)
@classmethod
- def New(cls, configuration, test_suite, test, metric, auto_explore, bug_id):
- # Get list of quests.
- quests = [quest_module.FindIsolate(configuration)]
- if test_suite:
- quests.append(quest_module.RunTest(configuration, test_suite, test,
- _DEFAULT_REPEAT_COUNT))
- if metric:
- quests.append(quest_module.ReadValue(metric, test))
-
+ def New(cls, arguments, quests, auto_explore, bug_id):
# Create job.
return cls(
- configuration=configuration,
- test_suite=test_suite,
- test=test,
- metric=metric,
+ arguments=arguments,
auto_explore=auto_explore,
bug_id=bug_id,
state=_JobState(quests, _DEFAULT_ATTEMPT_COUNT))
@@ -163,10 +148,7 @@ class Job(ndb.Model):
return {
'job_id': self.job_id,
- 'configuration': self.configuration,
- 'test_suite': self.test_suite,
- 'test': self.test,
- 'metric': self.metric,
+ 'arguments': self.arguments,
'auto_explore': self.auto_explore,
'created': self.created.strftime('%Y-%m-%d %H:%M:%S %Z'),
« no previous file with comments | « dashboard/dashboard/pinpoint/models/change.py ('k') | dashboard/dashboard/pinpoint/models/quest/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698