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

Side by Side Diff: tools/perf/benchmarks/robohornet_pro.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
« no previous file with comments | « tools/perf/benchmarks/oortonline.py ('k') | tools/perf/benchmarks/service_worker.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 2012 The Chromium Authors. All rights reserved. 1 # Copyright 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
5 """Runs Microsoft's RoboHornet Pro benchmark.""" 5 """Runs Microsoft's RoboHornet Pro benchmark."""
6 6
7 import os 7 import os
8 8
9 from core import perf_benchmark 9 from core import perf_benchmark
10 10
(...skipping 15 matching lines...) Expand all
26 def CustomizeBrowserOptions(self, options): 26 def CustomizeBrowserOptions(self, options):
27 power.PowerMetric.CustomizeBrowserOptions(options) 27 power.PowerMetric.CustomizeBrowserOptions(options)
28 28
29 def WillStartBrowser(self, platform): 29 def WillStartBrowser(self, platform):
30 self._power_metric = power.PowerMetric(platform) 30 self._power_metric = power.PowerMetric(platform)
31 31
32 def DidNavigateToPage(self, page, tab): 32 def DidNavigateToPage(self, page, tab):
33 self._power_metric.Start(page, tab) 33 self._power_metric.Start(page, tab)
34 34
35 def ValidateAndMeasurePage(self, page, tab, results): 35 def ValidateAndMeasurePage(self, page, tab, results):
36 tab.ExecuteJavaScript2('ToggleRoboHornet()') 36 tab.ExecuteJavaScript('ToggleRoboHornet()')
37 tab.WaitForJavaScriptCondition2( 37 tab.WaitForJavaScriptCondition(
38 'document.getElementById("results").innerHTML.indexOf("Total") != -1', 38 'document.getElementById("results").innerHTML.indexOf("Total") != -1',
39 timeout=600) 39 timeout=600)
40 40
41 self._power_metric.Stop(page, tab) 41 self._power_metric.Stop(page, tab)
42 self._power_metric.AddResults(tab, results) 42 self._power_metric.AddResults(tab, results)
43 43
44 result = int(tab.EvaluateJavaScript2('stopTime - startTime')) 44 result = int(tab.EvaluateJavaScript('stopTime - startTime'))
45 results.AddValue( 45 results.AddValue(
46 scalar.ScalarValue(results.current_page, 'Total', 'ms', result)) 46 scalar.ScalarValue(results.current_page, 'Total', 'ms', result))
47 47
48 48
49 # We plan to remove this test because it doesn't give useful data, but 49 # We plan to remove this test because it doesn't give useful data, but
50 # we need to wait until Chrome OS can implement support for more helpful 50 # we need to wait until Chrome OS can implement support for more helpful
51 # benchmarks. 51 # benchmarks.
52 @benchmark.Enabled('chromeos') 52 @benchmark.Enabled('chromeos')
53 class RobohornetPro(perf_benchmark.PerfBenchmark): 53 class RobohornetPro(perf_benchmark.PerfBenchmark):
54 """Milliseconds to complete the RoboHornetPro demo by Microsoft. 54 """Milliseconds to complete the RoboHornetPro demo by Microsoft.
(...skipping 10 matching lines...) Expand all
65 ps = story.StorySet( 65 ps = story.StorySet(
66 archive_data_file='../page_sets/data/robohornet_pro.json', 66 archive_data_file='../page_sets/data/robohornet_pro.json',
67 base_dir=os.path.dirname(os.path.abspath(__file__)), 67 base_dir=os.path.dirname(os.path.abspath(__file__)),
68 cloud_storage_bucket=story.PARTNER_BUCKET) 68 cloud_storage_bucket=story.PARTNER_BUCKET)
69 ps.AddStory(page_module.Page( 69 ps.AddStory(page_module.Page(
70 'http://ie.microsoft.com/testdrive/performance/robohornetpro/', 70 'http://ie.microsoft.com/testdrive/performance/robohornetpro/',
71 ps, ps.base_dir, 71 ps, ps.base_dir,
72 # Measurement require use of real Date.now() for measurement. 72 # Measurement require use of real Date.now() for measurement.
73 make_javascript_deterministic=False)) 73 make_javascript_deterministic=False))
74 return ps 74 return ps
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/oortonline.py ('k') | tools/perf/benchmarks/service_worker.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698