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

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: After offline discussion with nednguyen, replacing _AddEventsResults with a mock model to directly … 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 2015 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
eakuefner 2015/11/18 18:39:53 this and the next line should be switched; these a
gabadie 2015/11/18 19:16:31 Done.
6 from core import perf_benchmark
eakuefner 2015/11/18 18:39:52 newline between perf import section and third-part
gabadie 2015/11/18 19:16:31 Done.
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
12
13 class _StartWithUrlTBM(perf_benchmark.PerfBenchmark):
eakuefner 2015/11/18 18:39:52 nit: newline after this line. the rule is, blank l
pasko 2015/11/18 18:56:46 it would be nice to have a docstring
gabadie 2015/11/18 19:16:31 Done.
14 page_set = page_sets.StartupPagesPageSetTBM
15
16 @classmethod
17 def Name(cls):
18 # TODO(gabadie): We don't want to replace start_with_url.* yet.
19 return 'start_with_url2.startup_pages'
20
21 def SetExtraBrowserOptions(self, options):
22 options.AppendExtraBrowserArgs([
23 '--enable-stats-collection-bindings'
24 ])
25
26 def CreateTimelineBasedMeasurementOptions(self):
27 startup_category_filter = tracing_category_filter.TracingCategoryFilter(
28 filter_string='startup,blink.user_timing')
29 options = timeline_based_measurement.Options(
30 overhead_level=startup_category_filter)
31 options.SetTimelineBasedMetrics(
32 [startup.StartupTimelineMetric()])
33 return options
34
35
36 @benchmark.Enabled('has tabs')
37 @benchmark.Enabled('android')
38 @benchmark.Disabled('chromeos', 'linux', 'mac', 'win')
39 class StartWithUrlColdTBM(_StartWithUrlTBM):
40 """Measure time to start Chrome cold with startup URLs"""
eakuefner 2015/11/18 18:39:52 nit: newline after docstring
pasko 2015/11/18 18:56:46 nit: s/Measure/Measures/ (it's a class)
gabadie 2015/11/18 19:16:31 Done.
41 options = {'pageset_repeat': 5}
42
43 def SetExtraBrowserOptions(self, options):
44 options.clear_sytem_cache_for_browser_and_profile_on_start = True
45 super(StartWithUrlColdTBM, self).SetExtraBrowserOptions(options)
46
47 @classmethod
48 def Name(cls):
49 return 'start_with_url2.cold.startup_pages'
50
51
52 @benchmark.Enabled('has tabs')
53 @benchmark.Enabled('android')
54 @benchmark.Disabled('chromeos', 'linux', 'mac', 'win')
55 class StartWithUrlWarmTBM(_StartWithUrlTBM):
56 """Measure time to start Chrome warm with startup URLs"""
eakuefner 2015/11/18 18:39:52 nit: newline after docstring.
gabadie 2015/11/18 19:16:31 Done.
57 options = {'pageset_repeat': 10}
58
59 @classmethod
60 def Name(cls):
61 return 'start_with_url2.warm.startup_pages'
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