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

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

Issue 2912253002: Explicitly setting story names for the blink story sets. (Closed)
Patch Set: Explicitly setting story names for the blink story sets. Created 3 years, 6 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 import os 5 import os
6 6
7 from core import path_util 7 from core import path_util
8 from core import perf_benchmark 8 from core import perf_benchmark
9 9
10 from page_sets import webgl_supported_shared_state 10 from page_sets import webgl_supported_shared_state
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 if os.path.exists(skipped_file): 60 if os.path.exists(skipped_file):
61 for line in open(skipped_file, 'r').readlines(): 61 for line in open(skipped_file, 'r').readlines():
62 line = line.strip() 62 line = line.strip()
63 if line and not line.startswith('#'): 63 if line and not line.startswith('#'):
64 skipped_path = os.path.join(os.path.dirname(skipped_file), line) 64 skipped_path = os.path.join(os.path.dirname(skipped_file), line)
65 skipped.append(skipped_path.replace('/', os.sep)) 65 skipped.append(skipped_path.replace('/', os.sep))
66 _AddDir(path, tuple(skipped)) 66 _AddDir(path, tuple(skipped))
67 else: 67 else:
68 _AddPage(path) 68 _AddPage(path)
69 ps = story.StorySet(base_dir=os.getcwd() + os.sep, 69 ps = story.StorySet(base_dir=os.getcwd() + os.sep,
70 serving_dirs=serving_dirs) 70 serving_dirs=serving_dirs,
71 verify_names=True)
72
73 all_urls = [p.rstrip('/') for p in page_urls]
74 common_prefix = os.path.dirname(os.path.commonprefix(all_urls))
71 for url in page_urls: 75 for url in page_urls:
76 name = url[len(common_prefix):].strip('/')
72 ps.AddStory(page_module.Page( 77 ps.AddStory(page_module.Page(
73 url, ps, ps.base_dir, 78 url, ps, ps.base_dir,
74 shared_page_state_class=shared_page_state_class)) 79 shared_page_state_class=shared_page_state_class,
80 name=name))
75 return ps 81 return ps
76 82
77 83
78 def _ComputeTraceEventsThreadTimeForBlinkPerf( 84 def _ComputeTraceEventsThreadTimeForBlinkPerf(
79 model, renderer_thread, trace_events_to_measure): 85 model, renderer_thread, trace_events_to_measure):
80 """ Compute the CPU duration for each of |trace_events_to_measure| during 86 """ Compute the CPU duration for each of |trace_events_to_measure| during
81 blink_perf test. 87 blink_perf test.
82 88
83 Args: 89 Args:
84 renderer_thread: the renderer thread which run blink_perf test. 90 renderer_thread: the renderer thread which run blink_perf test.
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 345
340 346
341 @benchmark.Owner(emails=['hayato@chromium.org']) 347 @benchmark.Owner(emails=['hayato@chromium.org'])
342 class BlinkPerfShadowDOM(_BlinkPerfBenchmark): 348 class BlinkPerfShadowDOM(_BlinkPerfBenchmark):
343 tag = 'shadow_dom' 349 tag = 'shadow_dom'
344 subdir = 'ShadowDOM' 350 subdir = 'ShadowDOM'
345 351
346 @classmethod 352 @classmethod
347 def ShouldDisable(cls, possible_browser): # http://crbug.com/702319 353 def ShouldDisable(cls, possible_browser): # http://crbug.com/702319
348 return possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X' 354 return possible_browser.platform.GetDeviceTypeName() == 'Nexus 5X'
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