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

Side by Side Diff: telemetry/telemetry/benchmark.py

Issue 2304893002: [Telemetry] Switch ShouldTearDownStateAfterEachStoryRun to True as default (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import optparse 5 import optparse
6 6
7 from telemetry import decorators 7 from telemetry import decorators
8 from telemetry.internal import story_runner 8 from telemetry.internal import story_runner
9 from telemetry.internal.util import command_line 9 from telemetry.internal.util import command_line
10 from telemetry.page import legacy_page_test 10 from telemetry.page import legacy_page_test
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 """Override to specify whether to tear down state after each story run. 103 """Override to specify whether to tear down state after each story run.
104 104
105 Tearing down all states after each story run, e.g., clearing profiles, 105 Tearing down all states after each story run, e.g., clearing profiles,
106 stopping the browser, stopping local server, etc. So the browser will not be 106 stopping the browser, stopping local server, etc. So the browser will not be
107 reused among multiple stories. This is particularly useful to get the 107 reused among multiple stories. This is particularly useful to get the
108 startup part of launching the browser in each story. 108 startup part of launching the browser in each story.
109 109
110 This should only be used by TimelineBasedMeasurement (TBM) benchmarks, but 110 This should only be used by TimelineBasedMeasurement (TBM) benchmarks, but
111 not by PageTest based benchmarks. 111 not by PageTest based benchmarks.
112 """ 112 """
113 return False 113 return True
114 114
115 @classmethod 115 @classmethod
116 def ShouldTearDownStateAfterEachStorySetRun(cls): 116 def ShouldTearDownStateAfterEachStorySetRun(cls):
117 """Override to specify whether to tear down state after each story set run. 117 """Override to specify whether to tear down state after each story set run.
118 118
119 Defaults to True in order to reset the state and make individual story set 119 Defaults to True in order to reset the state and make individual story set
120 repeats more independent of each other. The intended effect is to average 120 repeats more independent of each other. The intended effect is to average
121 out noise in measurements between repeats. 121 out noise in measurements between repeats.
122 122
123 Long running benchmarks willing to stess test the browser and have it run 123 Long running benchmarks willing to stess test the browser and have it run
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 raise NotImplementedError('This test has no "page_set" attribute.') 258 raise NotImplementedError('This test has no "page_set" attribute.')
259 return self.page_set() # pylint: disable=not-callable 259 return self.page_set() # pylint: disable=not-callable
260 260
261 261
262 def AddCommandLineArgs(parser): 262 def AddCommandLineArgs(parser):
263 story_runner.AddCommandLineArgs(parser) 263 story_runner.AddCommandLineArgs(parser)
264 264
265 265
266 def ProcessCommandLineArgs(parser, args): 266 def ProcessCommandLineArgs(parser, args):
267 story_runner.ProcessCommandLineArgs(parser, args) 267 story_runner.ProcessCommandLineArgs(parser, args)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698