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

Unified Diff: telemetry/telemetry/benchmark.py

Issue 2091103003: [Telemetry] Add Benchmark.ShouldTearDownStateAfterEachStorySetRun (Closed) Base URL: git@github.com:catapult-project/catapult@master
Patch Set: do not change default Created 4 years, 6 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') | no next file with comments »
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 c67bad5c4a1953b0bef6beb48e9f7e13dc34454c..0e7a184b2bf39892af09bd71c48ec017bf656d1c 100644
--- a/telemetry/telemetry/benchmark.py
+++ b/telemetry/telemetry/benchmark.py
@@ -100,7 +100,7 @@ class Benchmark(command_line.Command):
@classmethod
def ShouldTearDownStateAfterEachStoryRun(cls):
- """Override this method to tear down state after each story run.
+ """Override to specify whether 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
@@ -113,6 +113,25 @@ class Benchmark(command_line.Command):
return False
@classmethod
+ def ShouldTearDownStateAfterEachStorySetRun(cls):
+ """Override to specify whether to tear down state after each story set run.
+
+ Defaults to True in order to reset the state and make individual story set
+ repeats more independent of each other. The intended effect is to average
+ out noise in measurements between repeats.
+
+ Long running benchmarks willing to stess test the browser and have it run
+ for long periods of time may switch this value to False.
+
+ This should only be used by TimelineBasedMeasurement (TBM) benchmarks, but
+ not by PageTest based benchmarks.
+ """
+ # TODO(perezju): Switch default value after any benchmarks requiring the
+ # old behaviour are updated accordingly.
+ # https://github.com/catapult-project/catapult/issues/2294#issuecomment-228306977
nednguyen 2016/06/24 16:11:55 this may cause a lint check failure. Feel free to
+ 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/benchmark_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698