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

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: Removes outdated comment 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
OLDNEW
(Empty)
1 # Copyright 2014 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 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)
eakuefner 2015/11/17 16:51:52 You probably don't need this since you're not coll
gabadie 2015/11/17 18:14:23 Done.
27
28 def CreateTimelineBasedMeasurementOptions(self):
29 startup_category_filter = tracing_category_filter.TracingCategoryFilter(
30 filter_string='startup,blink.user_timing')
31 options = timeline_based_measurement.Options(
32 overhead_level=startup_category_filter)
33 options.SetTimelineBasedMetrics(
34 [startup.StartupTimelineMetric()])
35 return options
36
37
38 @benchmark.Enabled('has tabs')
39 @benchmark.Enabled('android')
40 @benchmark.Disabled('chromeos', 'linux', 'mac', 'win')
41 class StartWithUrlColdTBM(_StartWithUrlTBM):
42 """Measure time to start Chrome cold with startup URLs"""
43 options = {'pageset_repeat': 5}
44
45 def SetExtraBrowserOptions(self, options):
46 options.clear_sytem_cache_for_browser_and_profile_on_start = True
47 super(StartWithUrlColdTBM, self).SetExtraBrowserOptions(options)
48
49 @classmethod
50 def Name(cls):
51 return 'start_with_url2.cold.startup_pages'
52
53
54 @benchmark.Enabled('has tabs')
55 @benchmark.Enabled('android')
56 @benchmark.Disabled('chromeos', 'linux', 'mac', 'win')
57 class StartWithUrlWarmTBM(_StartWithUrlTBM):
58 """Measure time to start Chrome warm with startup URLs"""
59 options = {'pageset_repeat': 10}
60
61 @classmethod
62 def Name(cls):
63 return 'start_with_url2.warm.startup_pages'
64
65 # TODO(gabadie): Uncomment this method and pageset_repeat++. This a current
eakuefner 2015/11/17 16:51:52 Please don't leave commented code in your CL like
gabadie 2015/11/17 18:14:23 Done. Created crbug.com/557242.
66 # bug discovered in start_with_url where the results in the first page set
67 # iterations are actually cold because the profile was empty. However we
68 # don't want to fix right now because we want to make sure first that
69 # start_with_url2.* have same values as start_with_url.* before fixing this
70 # bug (pasko@chromium.org).
71 # @classmethod
72 # def ValueCanBeAddedPredicate(cls, _, is_first_result):
73 # # Ignores first results because the first invocation is actualy cold since
74 # # we are loading the profile for the first time.
75 # return not is_first_result
OLDNEW
« no previous file with comments | « no previous file | tools/perf/page_sets/startup_pages.py » ('j') | tools/perf/page_sets/startup_pages.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698