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

Unified Diff: telemetry/telemetry/benchmark.py

Issue 2843403005: [Telemetry] Add Expectation module that enables disabling benchmarks/stories (Closed)
Patch Set: 30 -> 50 Created 3 years, 7 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 | telemetry/telemetry/benchmark_unittest.py » ('j') | telemetry/telemetry/benchmark_unittest.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/benchmark.py
diff --git a/telemetry/telemetry/benchmark.py b/telemetry/telemetry/benchmark.py
index 3cf78fff127ea76d48d82ad35835ba8c632fda79..a8fd2f12225e84c2161e5302333e03fc9864da49 100644
--- a/telemetry/telemetry/benchmark.py
+++ b/telemetry/telemetry/benchmark.py
@@ -8,6 +8,7 @@ from telemetry import decorators
from telemetry.internal import story_runner
from telemetry.internal.util import command_line
from telemetry.page import legacy_page_test
+from telemetry.story import expectations
from telemetry.web_perf import timeline_based_measurement
Disabled = decorators.Disabled
@@ -265,6 +266,14 @@ class Benchmark(command_line.Command):
raise NotImplementedError('This test has no "page_set" attribute.')
return self.page_set() # pylint: disable=not-callable
+ def GetExpectations(self):
+ """Returns a StoryExpectation object.
+
+ This object is used to determine what stories are disabled. This needs to be
+ overridden by the subclass. It defaults to an empty expectations object.
+ """
+ return expectations.StoryExpectations()
+
def AddCommandLineArgs(parser):
story_runner.AddCommandLineArgs(parser)
« no previous file with comments | « no previous file | telemetry/telemetry/benchmark_unittest.py » ('j') | telemetry/telemetry/benchmark_unittest.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698