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

Side by Side Diff: tools/perf/benchmarks/maps.py

Issue 876063004: [Telemetry] fix maps.py benchmark (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« 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 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 a Google Maps performance test. 5 """Runs a Google Maps performance test.
6 Rerforms several common navigation actions on the map (pan, zoom, rotate)""" 6 Rerforms several common navigation actions on the map (pan, zoom, rotate)"""
7 7
8 import os 8 import os
9 import re 9 import re
10 10
(...skipping 10 matching lines...) Expand all
21 super(_MapsMeasurement, self).__init__( 21 super(_MapsMeasurement, self).__init__(
22 action_name_to_run='RunPageInteractions') 22 action_name_to_run='RunPageInteractions')
23 23
24 def ValidateAndMeasurePage(self, page, tab, results): 24 def ValidateAndMeasurePage(self, page, tab, results):
25 js_get_results = 'document.getElementsByTagName("pre")[0].innerText' 25 js_get_results = 'document.getElementsByTagName("pre")[0].innerText'
26 test_results = tab.EvaluateJavaScript(js_get_results) 26 test_results = tab.EvaluateJavaScript(js_get_results)
27 27
28 total = re.search('total=([0-9]+)', test_results).group(1) 28 total = re.search('total=([0-9]+)', test_results).group(1)
29 render = re.search('render=([0-9.]+),([0-9.]+)', test_results).group(2) 29 render = re.search('render=([0-9.]+),([0-9.]+)', test_results).group(2)
30 results.AddValue(scalar.ScalarValue( 30 results.AddValue(scalar.ScalarValue(
31 results.current_page, 'total_time', 'ms', total)) 31 results.current_page, 'total_time', 'ms', int(total)))
32 results.AddValue(scalar.ScalarValue( 32 results.AddValue(scalar.ScalarValue(
33 results.current_page, 'render_mean_time', 'ms', render)) 33 results.current_page, 'render_mean_time', 'ms', float(render)))
34 34
35 class MapsPage(page_module.Page): 35 class MapsPage(page_module.Page):
36 def __init__(self, page_set, base_dir): 36 def __init__(self, page_set, base_dir):
37 super(MapsPage, self).__init__( 37 super(MapsPage, self).__init__(
38 url='http://localhost:10020/tracker.html', 38 url='http://localhost:10020/tracker.html',
39 page_set=page_set, 39 page_set=page_set,
40 base_dir=base_dir, 40 base_dir=base_dir,
41 make_javascript_deterministic=False) 41 make_javascript_deterministic=False)
42 42
43 def RunNavigateSteps(self, action_runner): 43 def RunNavigateSteps(self, action_runner):
(...skipping 22 matching lines...) Expand all
66 class MapsNoVsync(MapsBenchmark): 66 class MapsNoVsync(MapsBenchmark):
67 """Runs the Google Maps benchmark with Vsync disabled""" 67 """Runs the Google Maps benchmark with Vsync disabled"""
68 tag = 'novsync' 68 tag = 'novsync'
69 69
70 @classmethod 70 @classmethod
71 def Name(cls): 71 def Name(cls):
72 return 'maps.novsync' 72 return 'maps.novsync'
73 73
74 def CustomizeBrowserOptions(self, options): 74 def CustomizeBrowserOptions(self, options):
75 options.AppendExtraBrowserArgs('--disable-gpu-vsync') 75 options.AppendExtraBrowserArgs('--disable-gpu-vsync')
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