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

Side by Side Diff: tools/perf/perf_tools/robohornetpro.py

Issue 12278015: [Telemetry] Reorganize everything. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-add shebangs. Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « tools/perf/perf_tools/page_cycler.py ('k') | tools/perf/perf_tools/skpicture_printer.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 from telemetry.core import util
5 from telemetry import multi_page_benchmark 5 from telemetry.page import multi_page_benchmark
6 from telemetry import util
7 6
8 class RobohornetPro(multi_page_benchmark.MultiPageBenchmark): 7 class RobohornetPro(multi_page_benchmark.MultiPageBenchmark):
9 def CustomizeBrowserOptions(self, options): 8 def CustomizeBrowserOptions(self, options):
10 # Benchmark require use of real Date.now() for measurement. 9 # Benchmark require use of real Date.now() for measurement.
11 options.wpr_make_javascript_deterministic = False 10 options.wpr_make_javascript_deterministic = False
12 11
13 def MeasurePage(self, _, tab, results): 12 def MeasurePage(self, _, tab, results):
14 tab.ExecuteJavaScript('ToggleRoboHornet()') 13 tab.ExecuteJavaScript('ToggleRoboHornet()')
15 14
16 done = 'document.getElementById("results").innerHTML.indexOf("Total") != -1' 15 done = 'document.getElementById("results").innerHTML.indexOf("Total") != -1'
17 def _IsDone(): 16 def _IsDone():
18 return tab.EvaluateJavaScript(done) 17 return tab.EvaluateJavaScript(done)
19 util.WaitFor(_IsDone, 60) 18 util.WaitFor(_IsDone, 60)
20 19
21 result = int(tab.EvaluateJavaScript('stopTime - startTime')) 20 result = int(tab.EvaluateJavaScript('stopTime - startTime'))
22 results.Add('Total', 'ms', result) 21 results.Add('Total', 'ms', result)
OLDNEW
« no previous file with comments | « tools/perf/perf_tools/page_cycler.py ('k') | tools/perf/perf_tools/skpicture_printer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698