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

Side by Side Diff: tools/perf/measurements/oilpan_gc_times.py

Issue 2719853003: [Telemetry refactor] Drop "2" from method calls to JS API (Closed)
Patch Set: Created 3 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 unified diff | Download patch
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 os 5 import os
6 6
7 from telemetry.page import legacy_page_test 7 from telemetry.page import legacy_page_test
8 from telemetry.timeline.model import TimelineModel 8 from telemetry.timeline.model import TimelineModel
9 from telemetry.timeline import tracing_config 9 from telemetry.timeline import tracing_config
10 from telemetry.value import list_of_scalar_values 10 from telemetry.value import list_of_scalar_values
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 super(OilpanGCTimesForBlinkPerf, self).__init__() 181 super(OilpanGCTimesForBlinkPerf, self).__init__()
182 with open(os.path.join(os.path.dirname(__file__), '..', 'benchmarks', 182 with open(os.path.join(os.path.dirname(__file__), '..', 'benchmarks',
183 'blink_perf.js'), 'r') as f: 183 'blink_perf.js'), 'r') as f:
184 self._blink_perf_js = f.read() 184 self._blink_perf_js = f.read()
185 185
186 def WillNavigateToPage(self, page, tab): 186 def WillNavigateToPage(self, page, tab):
187 page.script_to_evaluate_on_commit = self._blink_perf_js 187 page.script_to_evaluate_on_commit = self._blink_perf_js
188 super(OilpanGCTimesForBlinkPerf, self).WillNavigateToPage(page, tab) 188 super(OilpanGCTimesForBlinkPerf, self).WillNavigateToPage(page, tab)
189 189
190 def ValidateAndMeasurePage(self, page, tab, results): 190 def ValidateAndMeasurePage(self, page, tab, results):
191 tab.WaitForJavaScriptCondition2('testRunner.isDone', timeout=600) 191 tab.WaitForJavaScriptCondition('testRunner.isDone', timeout=600)
192 super(OilpanGCTimesForBlinkPerf, self).ValidateAndMeasurePage( 192 super(OilpanGCTimesForBlinkPerf, self).ValidateAndMeasurePage(
193 page, tab, results) 193 page, tab, results)
194 194
195 195
196 class OilpanGCTimesForInternals(OilpanGCTimesForBlinkPerf): 196 class OilpanGCTimesForInternals(OilpanGCTimesForBlinkPerf):
197 197
198 def __init__(self): 198 def __init__(self):
199 super(OilpanGCTimesForInternals, self).__init__() 199 super(OilpanGCTimesForInternals, self).__init__()
200 200
201 @classmethod 201 @classmethod
202 def CustomizeBrowserOptions(cls, options): 202 def CustomizeBrowserOptions(cls, options):
203 # 'expose-internals-for-testing' can be enabled on content shell. 203 # 'expose-internals-for-testing' can be enabled on content shell.
204 assert 'content-shell' in options.browser_type 204 assert 'content-shell' in options.browser_type
205 options.AppendExtraBrowserArgs(['--expose-internals-for-testing', 205 options.AppendExtraBrowserArgs(['--expose-internals-for-testing',
206 '--js-flags=--expose-gc']) 206 '--js-flags=--expose-gc'])
OLDNEW
« no previous file with comments | « tools/perf/measurements/multipage_skpicture_printer.py ('k') | tools/perf/measurements/rasterize_and_record_micro.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698