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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: tools/perf/contrib/cros_benchmarks/tab_switching_bench.py
diff --git a/tools/perf/contrib/cros_benchmarks/tab_switching_bench.py b/tools/perf/contrib/cros_benchmarks/tab_switching_bench.py
new file mode 100644
index 0000000000000000000000000000000000000000..802f93230c48190a1a5ee424f31153097de178c0
--- /dev/null
+++ b/tools/perf/contrib/cros_benchmarks/tab_switching_bench.py
@@ -0,0 +1,44 @@
+# 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.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import os
+
+from core import perf_benchmark
+
+from contrib.cros_benchmarks.tab_switching_measure import TabSwitchingMeasurement
deanliao_goog 2017/05/19 09:49:46 Import module, not class. https://google.github.io
vovoy 2017/05/22 03:54:08 Done.
+from contrib.cros_benchmarks.tab_switching_stories import CrosMultiTabTypical24Story
+from telemetry import benchmark
+from telemetry import story
+
+
+@benchmark.Owner(emails=['vovoy@chromium.org'],
+ component='OS>Performance')
+@benchmark.Enabled('chromeos')
+class CrosTabSwitchingTypical24(perf_benchmark.PerfBenchmark):
+ """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.
+
+ The histogram is a measure of the time between when a tab was requested to be
+ shown, and when first paint occurred. The script opens 24 pages in different
+ tabs, waits for them to load, and then switches to each tab and records the
+ metric. The pages were chosen from Alexa top ranking sites.
+ """
+ test = TabSwitchingMeasurement
+
+ @classmethod
+ def AddBenchmarkCommandLineArgs(cls, parser):
+ parser.add_option('--tabset-repeat', type='int', default=1,
+ help='repeat tab page set')
+
+ def CreateStorySet(self, options):
+ story_set = story.StorySet(
+ archive_data_file='data/tab_switching.json',
+ base_dir=os.path.dirname(os.path.abspath(__file__)),
+ cloud_storage_bucket=story.PARTNER_BUCKET)
+ story_set.AddStory(CrosMultiTabTypical24Story(
+ story_set, options.tabset_repeat))
+ return story_set
+
+ @classmethod
+ def Name(cls):
+ return 'cros_tab_switching.typical_24'

Powered by Google App Engine
This is Rietveld 408576698