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

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

Issue 806513002: Move make_javascript_deterministic to UserStory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years 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/jetstream.py ('k') | tools/perf/benchmarks/octane.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 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 13 matching lines...) Expand all
24 total = re.search('total=([0-9]+)', test_results).group(1) 24 total = re.search('total=([0-9]+)', test_results).group(1)
25 render = re.search('render=([0-9.]+),([0-9.]+)', test_results).group(2) 25 render = re.search('render=([0-9.]+),([0-9.]+)', test_results).group(2)
26 results.AddValue(scalar.ScalarValue( 26 results.AddValue(scalar.ScalarValue(
27 results.current_page, 'total_time', 'ms', total)) 27 results.current_page, 'total_time', 'ms', total))
28 results.AddValue(scalar.ScalarValue( 28 results.AddValue(scalar.ScalarValue(
29 results.current_page, 'render_mean_time', 'ms', render)) 29 results.current_page, 'render_mean_time', 'ms', render))
30 30
31 class MapsPage(page_module.Page): 31 class MapsPage(page_module.Page):
32 def __init__(self, page_set, base_dir): 32 def __init__(self, page_set, base_dir):
33 super(MapsPage, self).__init__( 33 super(MapsPage, self).__init__(
34 url='http://localhost:10020/tracker.html', 34 url='http://localhost:10020/tracker.html',
35 page_set=page_set, 35 page_set=page_set,
36 base_dir=base_dir) 36 base_dir=base_dir,
37 make_javascript_deterministic=False)
37 38
38 def RunNavigateSteps(self, action_runner): 39 def RunNavigateSteps(self, action_runner):
39 action_runner.NavigateToPage(self) 40 action_runner.NavigateToPage(self)
40 action_runner.WaitForJavaScriptCondition('window.testDone') 41 action_runner.WaitForJavaScriptCondition('window.testDone')
41 42
42 43
43 @benchmark.Disabled 44 @benchmark.Disabled
44 class MapsBenchmark(benchmark.Benchmark): 45 class MapsBenchmark(benchmark.Benchmark):
45 """Basic Google Maps benchmarks.""" 46 """Basic Google Maps benchmarks."""
46 test = _MapsMeasurement 47 test = _MapsMeasurement
47 48
48 def CreatePageSet(self, options): 49 def CreatePageSet(self, options):
49 page_set_path = os.path.join( 50 page_set_path = os.path.join(
50 util.GetChromiumSrcDir(), 'tools', 'perf', 'page_sets') 51 util.GetChromiumSrcDir(), 'tools', 'perf', 'page_sets')
51 ps = page_set_module.PageSet( 52 ps = page_set_module.PageSet(
52 archive_data_file='data/maps.json', 53 archive_data_file='data/maps.json',
53 make_javascript_deterministic=False, 54 file_path=page_set_path)
54 file_path=page_set_path)
55 ps.AddUserStory(MapsPage(ps, ps.base_dir)) 55 ps.AddUserStory(MapsPage(ps, ps.base_dir))
56 return ps 56 return ps
57 57
58 class MapsNoVsync(MapsBenchmark): 58 class MapsNoVsync(MapsBenchmark):
59 """Runs the Google Maps benchmark with Vsync disabled""" 59 """Runs the Google Maps benchmark with Vsync disabled"""
60 tag = 'novsync' 60 tag = 'novsync'
61 61
62 def CustomizeBrowserOptions(self, options): 62 def CustomizeBrowserOptions(self, options):
63 options.AppendExtraBrowserArgs('--disable-gpu-vsync') 63 options.AppendExtraBrowserArgs('--disable-gpu-vsync')
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/jetstream.py ('k') | tools/perf/benchmarks/octane.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698