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

Side by Side Diff: tools/perf/contrib/cros_benchmarks/tab_switching_bench.py

Issue 2890333002: Tab Switching Benchmark for ChromeOS (Closed)
Patch Set: Minor fixes. 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
OLDNEW
(Empty)
1 # Copyright 2017 The Chromium Authors. All rights reserved.
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 import tab_switching_measure
10 from contrib.cros_benchmarks import tab_switching_stories
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 """Measuring the tab switching performance when there are many tabs.
deanliao_goog 2017/05/23 08:54:26 Measures tab switching performance with 24 tabs.
vovoy 2017/05/24 09:17:22 Done.
20
21 The script opens 24 pages in 24 different tabs, waits for them to load,
22 and then switches to each tabs and measures the tabs paint time. The 24
23 pages were chosen from Alexa top ranking sites. Tab paint time is the
24 time between when a tab was requested to be shwon, and when first paint
deanliao_goog 2017/05/23 08:54:26 time between tab being requested and the first pai
vovoy 2017/05/24 09:17:22 Done.
25 occurred.
26
27 --tabset-repeat=N: Multiply the tab count by N to open more tabs.
deanliao_goog 2017/05/23 08:54:26 How about this: Benchmark specific option: --ta
vovoy 2017/05/24 09:17:21 Done.
28 The following usage example opens 120 tabs.
29 $ ./run_benchmark --browser=cros-chrome --remote=DUT_IP
30 cros_tab_switching.typical_24 --tabset-repeat=5
31 """
32 test = tab_switching_measure.CrosTabSwitchingMeasurement
33
34 @classmethod
35 def AddBenchmarkCommandLineArgs(cls, parser):
36 parser.add_option('--tabset-repeat', type='int', default=1,
37 help='repeat tab page set')
38
39 def CreateStorySet(self, options):
40 if not options.cros_remote:
41 raise ValueError('Must specify --remote=DUT_IP to run this test.')
42 story_set = story.StorySet(
43 archive_data_file='data/tab_switching.json',
44 base_dir=os.path.dirname(os.path.abspath(__file__)),
45 cloud_storage_bucket=story.PARTNER_BUCKET)
46 story_set.AddStory(tab_switching_stories.CrosMultiTabTypical24Story(
47 story_set, options.cros_remote, options.tabset_repeat))
48 return story_set
49
50 @classmethod
51 def Name(cls):
52 return 'cros_tab_switching.typical_24'
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698