OLD | NEW |
---|---|
(Empty) | |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | |
bccheng
2017/05/19 09:09:14
Change it to 2017?
vovoy
2017/05/22 03:54:08
Done.
| |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 | |
5 import os | |
6 | |
7 from core import perf_benchmark | |
8 | |
9 from contrib.cros_benchmarks.tab_switching_measure import TabSwitchingMeasuremen t | |
deanliao_goog
2017/05/19 09:49:46
Import module, not class.
https://google.github.io
vovoy
2017/05/22 03:54:08
Done.
| |
10 from contrib.cros_benchmarks.tab_switching_stories import CrosMultiTabTypical24S tory | |
11 from telemetry import benchmark | |
12 from telemetry import story | |
13 | |
14 | |
15 @benchmark.Owner(emails=['vovoy@chromium.org'], | |
16 component='OS>Performance') | |
17 @benchmark.Enabled('chromeos') | |
18 class CrosTabSwitchingTypical24(perf_benchmark.PerfBenchmark): | |
19 """This test records the MPArch.RWH_TabSwitchPaintDuration histogram. | |
deanliao_goog
2017/05/19 09:49:46
Please rewrite the one-line description of the ben
vovoy
2017/05/22 03:54:08
Done.
| |
20 | |
21 The histogram is a measure of the time between when a tab was requested to be | |
22 shown, and when first paint occurred. The script opens 24 pages in different | |
23 tabs, waits for them to load, and then switches to each tab and records the | |
24 metric. The pages were chosen from Alexa top ranking sites. | |
25 """ | |
26 test = TabSwitchingMeasurement | |
27 | |
28 @classmethod | |
29 def AddBenchmarkCommandLineArgs(cls, parser): | |
30 parser.add_option('--tabset-repeat', type='int', default=1, | |
31 help='repeat tab page set') | |
32 | |
33 def CreateStorySet(self, options): | |
34 story_set = story.StorySet( | |
35 archive_data_file='data/tab_switching.json', | |
36 base_dir=os.path.dirname(os.path.abspath(__file__)), | |
37 cloud_storage_bucket=story.PARTNER_BUCKET) | |
38 story_set.AddStory(CrosMultiTabTypical24Story( | |
39 story_set, options.tabset_repeat)) | |
40 return story_set | |
41 | |
42 @classmethod | |
43 def Name(cls): | |
44 return 'cros_tab_switching.typical_24' | |
OLD | NEW |