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

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

Issue 2819423002: Support flag --tabset-repeat on benchmark tab_switching (Closed)
Patch Set: fixing style Created 3 years, 7 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 | tools/perf/page_sets/system_health/multi_tab_stories.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
6
5 from core import perf_benchmark 7 from core import perf_benchmark
6 8
7 from measurements import tab_switching 9 from measurements import tab_switching
8 import page_sets 10 from page_sets.system_health import multi_tab_stories
9 from telemetry import benchmark 11 from telemetry import benchmark
12 from telemetry import story
10 13
11 14
12 @benchmark.Owner(emails=['vovoy@chromium.org'], 15 @benchmark.Owner(emails=['vovoy@chromium.org'],
13 component='OS>Performance') 16 component='OS>Performance')
14 @benchmark.Enabled('has tabs') 17 @benchmark.Enabled('has tabs')
15 @benchmark.Disabled('mac') # http://crbug.com/612774 18 @benchmark.Disabled('mac') # http://crbug.com/612774
16 @benchmark.Disabled('android') # http://crbug.com/460084 19 @benchmark.Disabled('android') # http://crbug.com/460084
17 class TabSwitchingTypical25(perf_benchmark.PerfBenchmark): 20 class TabSwitchingTypical25(perf_benchmark.PerfBenchmark):
18 """This test records the MPArch.RWH_TabSwitchPaintDuration histogram. 21 """This test records the MPArch.RWH_TabSwitchPaintDuration histogram.
19 22
20 The histogram is a measure of the time between when a tab was requested to be 23 The histogram is a measure of the time between when a tab was requested to be
21 shown, and when first paint occurred. The script opens 25 pages in different 24 shown, and when first paint occurred. The script opens 25 pages in different
22 tabs, waits for them to load, and then switches to each tab and records the 25 tabs, waits for them to load, and then switches to each tab and records the
23 metric. The pages were chosen from Alexa top ranking sites. 26 metric. The pages were chosen from Alexa top ranking sites.
24 """ 27 """
25 test = tab_switching.TabSwitching 28 test = tab_switching.TabSwitching
26 29
30 @classmethod
31 def AddBenchmarkCommandLineArgs(cls, parser):
32 parser.add_option('--tabset-repeat', type='int', default=1,
33 help='repeat tab page set')
34
27 def CreateStorySet(self, options): 35 def CreateStorySet(self, options):
28 return page_sets.SystemHealthStorySet(platform='desktop', 36 story_set = story.StorySet(
29 case='multitab:misc') 37 archive_data_file='../page_sets/data/system_health_desktop.json',
38 base_dir=os.path.dirname(os.path.abspath(__file__)),
39 cloud_storage_bucket=story.PARTNER_BUCKET)
40 story_set.AddStory(multi_tab_stories.MultiTabTypical24Story(
41 story_set, False, options.tabset_repeat))
42 return story_set
30 43
31 @classmethod 44 @classmethod
32 def Name(cls): 45 def Name(cls):
33 return 'tab_switching.typical_25' 46 return 'tab_switching.typical_25'
34 47
35 @classmethod 48 @classmethod
36 def ShouldTearDownStateAfterEachStoryRun(cls): 49 def ShouldTearDownStateAfterEachStoryRun(cls):
37 return False 50 return False
OLDNEW
« no previous file with comments | « no previous file | tools/perf/page_sets/system_health/multi_tab_stories.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698