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

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

Issue 797133003: Kill PageSet.AddPageWithDefaultRunNavigate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | tools/perf/benchmarks/dom_perf.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 import os 5 import os
6 6
7 from telemetry import benchmark 7 from telemetry import benchmark
8 from telemetry import page as page_module
8 from telemetry.core import util 9 from telemetry.core import util
9 from telemetry.page import page_set 10 from telemetry.page import page_set
10 from telemetry.page import page_test 11 from telemetry.page import page_test
11 from telemetry.value import list_of_scalar_values 12 from telemetry.value import list_of_scalar_values
12 13
13 14
14 BLINK_PERF_BASE_DIR = os.path.join(util.GetChromiumSrcDir(), 15 BLINK_PERF_BASE_DIR = os.path.join(util.GetChromiumSrcDir(),
15 'third_party', 'WebKit', 'PerformanceTests') 16 'third_party', 'WebKit', 'PerformanceTests')
16 SKIPPED_FILE = os.path.join(BLINK_PERF_BASE_DIR, 'Skipped') 17 SKIPPED_FILE = os.path.join(BLINK_PERF_BASE_DIR, 'Skipped')
17 18
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 line = line.strip() 50 line = line.strip()
50 if line and not line.startswith('#'): 51 if line and not line.startswith('#'):
51 skipped_path = os.path.join(os.path.dirname(skipped_file), line) 52 skipped_path = os.path.join(os.path.dirname(skipped_file), line)
52 skipped.append(skipped_path.replace('/', os.sep)) 53 skipped.append(skipped_path.replace('/', os.sep))
53 _AddDir(path, tuple(skipped)) 54 _AddDir(path, tuple(skipped))
54 else: 55 else:
55 _AddPage(path) 56 _AddPage(path)
56 ps = page_set.PageSet(file_path=os.getcwd()+os.sep, 57 ps = page_set.PageSet(file_path=os.getcwd()+os.sep,
57 serving_dirs=serving_dirs) 58 serving_dirs=serving_dirs)
58 for url in page_urls: 59 for url in page_urls:
59 ps.AddPageWithDefaultRunNavigate(url) 60 ps.AddUserStory(page_module.Page(url, ps, ps.base_dir))
60 return ps 61 return ps
61 62
62 63
63 class _BlinkPerfMeasurement(page_test.PageTest): 64 class _BlinkPerfMeasurement(page_test.PageTest):
64 """Tuns a blink performance test and reports the results.""" 65 """Tuns a blink performance test and reports the results."""
65 def __init__(self): 66 def __init__(self):
66 super(_BlinkPerfMeasurement, self).__init__('') 67 super(_BlinkPerfMeasurement, self).__init__('')
67 with open(os.path.join(os.path.dirname(__file__), 68 with open(os.path.join(os.path.dirname(__file__),
68 'blink_perf.js'), 'r') as f: 69 'blink_perf.js'), 'r') as f:
69 self._blink_perf_js = f.read() 70 self._blink_perf_js = f.read()
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 225
225 # This benchmark is for local testing, doesn't need to run on bots. 226 # This benchmark is for local testing, doesn't need to run on bots.
226 @benchmark.Disabled() 227 @benchmark.Disabled()
227 class BlinkPerfXMLHttpRequest(benchmark.Benchmark): 228 class BlinkPerfXMLHttpRequest(benchmark.Benchmark):
228 tag = 'xml_http_request' 229 tag = 'xml_http_request'
229 test = _BlinkPerfMeasurement 230 test = _BlinkPerfMeasurement
230 231
231 def CreatePageSet(self, options): 232 def CreatePageSet(self, options):
232 path = os.path.join(BLINK_PERF_BASE_DIR, 'XMLHttpRequest') 233 path = os.path.join(BLINK_PERF_BASE_DIR, 'XMLHttpRequest')
233 return CreatePageSetFromPath(path, SKIPPED_FILE) 234 return CreatePageSetFromPath(path, SKIPPED_FILE)
OLDNEW
« no previous file with comments | « no previous file | tools/perf/benchmarks/dom_perf.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698