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

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

Issue 2890333002: Tab Switching Benchmark for ChromeOS (Closed)
Patch Set: Tab Switching Benchmark for ChromeOS 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.
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
25 occurred.
26
27 --tabset-repeat=N: Multiply the tab count by N to open more tabs.
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 story_set = story.StorySet(
41 archive_data_file='data/tab_switching.json',
42 base_dir=os.path.dirname(os.path.abspath(__file__)),
43 cloud_storage_bucket=story.PARTNER_BUCKET)
44 story_set.AddStory(tab_switching_stories.CrosMultiTabTypical24Story(
45 story_set, options.tabset_repeat))
46 return story_set
47
48 @classmethod
49 def Name(cls):
50 return 'cros_tab_switching.typical_24'
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698