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

Unified Diff: telemetry/telemetry/benchmark.py

Issue 1806023002: [Telemetry] Re-add API to tear down state after each story run (Closed) Base URL: git@github.com:catapult-project/catapult@master
Patch Set: fix test Created 4 years, 9 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: telemetry/telemetry/benchmark.py
diff --git a/telemetry/telemetry/benchmark.py b/telemetry/telemetry/benchmark.py
index 74febf1ea94c862bc2e77d06fbe68aa6dcddc0d7..44511e76a1147e5ade4991623efaa25ff8018c5c 100644
--- a/telemetry/telemetry/benchmark.py
+++ b/telemetry/telemetry/benchmark.py
@@ -99,6 +99,20 @@ class Benchmark(command_line.Command):
return '%s.%s' % (cls.__module__.split('.')[-1], cls.__name__)
@classmethod
+ def ShouldTearDownStateAfterEachStoryRun(cls):
+ """Override this method to tear down state after each story run.
+
+ Tearing down all states after each story run, e.g., clearing profiles,
+ stopping the browser, stopping local server, etc. So the browser will not be
+ reused among multiple stories. This is particularly useful to get the
+ startup part of launching the browser in each story.
+
+ This should only be used by TimelineBasedMeasurement (TBM) benchmarks, but
+ not by PageTest based benchmarks.
+ """
+ return False
+
+ @classmethod
def AddCommandLineArgs(cls, parser):
group = optparse.OptionGroup(parser, '%s test options' % cls.Name())
cls.AddBenchmarkCommandLineArgs(group)
« no previous file with comments | « no previous file | telemetry/telemetry/internal/story_runner.py » ('j') | telemetry/telemetry/page/page_run_end_to_end_unittest.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698