Chromium Code Reviews| Index: tools/perf/benchmarks/start_with_url2.py |
| diff --git a/tools/perf/benchmarks/start_with_url2.py b/tools/perf/benchmarks/start_with_url2.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..98ce0e0e48a298a9a74066922223fe08b30a0d86 |
| --- /dev/null |
| +++ b/tools/perf/benchmarks/start_with_url2.py |
| @@ -0,0 +1,66 @@ |
| +# Copyright 2015 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +from core import perf_benchmark |
| +import page_sets |
| + |
| +from telemetry import benchmark |
| +from telemetry.timeline import tracing_category_filter |
| +from telemetry.web_perf import timeline_based_measurement |
| +from telemetry.web_perf.metrics import startup |
| + |
| + |
| +class _StartWithUrlTBM(perf_benchmark.PerfBenchmark): |
| + """Measures time to start Chrome with startup URLs""" |
|
pasko
2015/11/19 13:08:17
nit: period, same below
gabadie
2015/11/19 16:25:25
Done.
|
| + |
| + page_set = page_sets.StartupPagesPageSetTBM |
| + |
| + @classmethod |
| + def Name(cls): |
| + # TODO(gabadie): We don't want to replace start_with_url.* yet. |
|
pasko
2015/11/19 13:08:17
please avoid 'We'. You could say:
TODO(gabadie):
gabadie
2015/11/19 16:25:25
Done.
|
| + return 'start_with_url2.startup_pages' |
| + |
| + def SetExtraBrowserOptions(self, options): |
| + options.AppendExtraBrowserArgs([ |
| + '--enable-stats-collection-bindings' |
| + ]) |
| + |
| + def CreateTimelineBasedMeasurementOptions(self): |
| + startup_category_filter = tracing_category_filter.TracingCategoryFilter( |
| + filter_string='startup,blink.user_timing') |
| + options = timeline_based_measurement.Options( |
| + overhead_level=startup_category_filter) |
| + options.SetTimelineBasedMetrics( |
| + [startup.StartupTimelineMetric()]) |
| + return options |
| + |
| + |
| +@benchmark.Enabled('has tabs') |
| +@benchmark.Enabled('android') |
| +@benchmark.Disabled('chromeos', 'linux', 'mac', 'win') |
| +class StartWithUrlColdTBM(_StartWithUrlTBM): |
| + """Measures time to start Chrome cold with startup URLs""" |
| + |
| + options = {'pageset_repeat': 5} |
| + |
| + def SetExtraBrowserOptions(self, options): |
| + options.clear_sytem_cache_for_browser_and_profile_on_start = True |
| + super(StartWithUrlColdTBM, self).SetExtraBrowserOptions(options) |
| + |
| + @classmethod |
| + def Name(cls): |
| + return 'start_with_url2.cold.startup_pages' |
| + |
| + |
| +@benchmark.Enabled('has tabs') |
| +@benchmark.Enabled('android') |
| +@benchmark.Disabled('chromeos', 'linux', 'mac', 'win') |
| +class StartWithUrlWarmTBM(_StartWithUrlTBM): |
| + """Measures stimetime to start Chrome warm with startup URLs""" |
| + |
| + options = {'pageset_repeat': 10} |
|
pasko
2015/11/19 13:08:17
Why 10 for warm and 5 for cold? Is this based on s
nednguyen
2015/11/19 15:56:46
For now, let's make these number the same as legac
pasko
2015/11/20 13:35:49
Acknowledged.
|
| + |
| + @classmethod |
| + def Name(cls): |
| + return 'start_with_url2.warm.startup_pages' |