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

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

Issue 1435243002: Re-implements start_with_url.* benchmarks as start_with_url2.* using TBM (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@b00
Patch Set: Fixes review concerns Created 5 years, 1 month 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/startup_pages.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2014 The Chromium Authors. All rights reserved.
eakuefner 2015/11/17 16:51:52 nit: 2015 since this is a new file.
gabadie 2015/11/17 18:14:23 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 page_sets
6 from core import perf_benchmark
7 from telemetry import benchmark
8 from telemetry.timeline import tracing_category_filter
9 from telemetry.web_perf import timeline_based_measurement
10 from telemetry.web_perf.metrics import startup
11 from metrics import keychain_metric
12
13
14 class _StartWithUrlTBM(perf_benchmark.PerfBenchmark):
15 page_set = page_sets.StartupPagesPageSetTBM
16
17 @classmethod
18 def Name(cls):
19 # TODO(gabadie): We don't want to replace start_with_url.* yet.
20 return 'start_with_url2.startup_pages'
21
22 def SetExtraBrowserOptions(self, options):
23 options.AppendExtraBrowserArgs([
24 '--enable-stats-collection-bindings'
25 ])
26 keychain_metric.KeychainMetric.CustomizeBrowserOptions(options)
27
28 def CreateTimelineBasedMeasurementOptions(self):
29 # Enable only memory-infra, to get memory dumps, and blink.console, to get
30 # the timeline markers used for mapping threads to tabs.
Zhen Wang 2015/11/13 22:33:05 nit: remove the comment if not for memory-infra an
31 startup_category_filter = tracing_category_filter.TracingCategoryFilter(
32 filter_string='startup,blink.user_timing')
33 options = timeline_based_measurement.Options(
34 overhead_level=startup_category_filter)
35 options.SetTimelineBasedMetrics(
36 [startup.StartupTimelineMetric()])
37 return options
38
39
40 @benchmark.Enabled('has tabs')
41 @benchmark.Enabled('android')
42 @benchmark.Disabled('chromeos', 'linux', 'mac', 'win')
43 class StartWithUrlColdTBM(_StartWithUrlTBM):
44 """Measure time to start Chrome cold with startup URLs"""
45 options = {'pageset_repeat': 5}
46
47 def SetExtraBrowserOptions(self, options):
48 options.clear_sytem_cache_for_browser_and_profile_on_start = True
49 super(StartWithUrlColdTBM, self).SetExtraBrowserOptions(options)
50
51 @classmethod
52 def Name(cls):
53 return 'start_with_url2.cold.startup_pages'
54
55
56 @benchmark.Enabled('has tabs')
57 @benchmark.Enabled('android')
58 @benchmark.Disabled('chromeos', 'linux', 'mac', 'win')
59 class StartWithUrlWarmTBM(_StartWithUrlTBM):
60 """Measure time to start Chrome warm with startup URLs"""
61 options = {'pageset_repeat': 10}
62
63 @classmethod
64 def Name(cls):
65 return 'start_with_url2.warm.startup_pages'
66
67 # TODO(gabadie): Uncomment this method and pageset_repeat++. This a current
68 # bug discovered in start_with_url where the results in the first page set
69 # iterations are actually cold because the profile was empty. However we
70 # don't want to fix right now because we want to make sure first that
71 # start_with_url2.* have same values as start_with_url.* before fixing this
72 # bug (pasko@chromium.org).
73 # @classmethod
74 # def ValueCanBeAddedPredicate(cls, _, is_first_result):
75 # # Ignores first results because the first invocation is actualy cold since
76 # # we are loading the profile for the first time.
77 # return not is_first_result
OLDNEW
« no previous file with comments | « no previous file | tools/perf/page_sets/startup_pages.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698