Chromium Code Reviews| Index: tools/perf/benchmarks/start_with_ext.py |
| diff --git a/tools/perf/benchmarks/start_with_ext.py b/tools/perf/benchmarks/start_with_ext.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..dbe537e274e211c0cddbb5a407dc5b7b7707ea18 |
| --- /dev/null |
| +++ b/tools/perf/benchmarks/start_with_ext.py |
| @@ -0,0 +1,52 @@ |
| +# 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 |
| +from measurements import startup |
| +import page_sets |
| +from telemetry import benchmark |
| + |
| + |
| +class _StartWithExt(perf_benchmark.PerfBenchmark): |
| + """Base Benchmark for testing startup with extensions. """ |
|
erikchen
2015/07/14 23:36:14
extra whitespace after "."
sydli
2015/07/15 22:56:23
Done.
|
| + page_set = page_sets.BlankPageSetWithExtensionProfile |
| + tag = None |
| + |
| + @classmethod |
| + def Name(cls): |
| + return 'start_with_ext.blank_page' |
| + |
| + @classmethod |
| + def ValueCanBeAddedPredicate(cls, _, is_first_result): |
| + return not is_first_result |
| + |
| + def SetExtraBrowserOptions(self, options): |
| + options.disable_default_apps = False |
| + |
| + def CreatePageTest(self, _): |
| + is_cold = (self.tag == 'cold') |
| + return startup.Startup(cold=is_cold) |
| + |
| + |
| +@benchmark.Enabled('has tabs') |
| +class StartWithExtCold(_StartWithExt): |
| + """Measure time to start Chrome cold with extensions""" |
|
erikchen
2015/07/14 23:36:14
period at end of sentence. ditto on line 45.
sydli
2015/07/15 22:56:23
Done.
|
| + options = {'pageset_repeat': 5} |
| + tag = 'cold' |
| + |
| + @classmethod |
| + def Name(cls): |
| + return 'start_with_ext.cold.blank_page' |
| + |
| + |
| +@benchmark.Enabled('has tabs') |
| +class StartWithExtWarm(_StartWithExt): |
| + """Measure time to start Chrome warm with extensions""" |
| + options = {'pageset_repeat': 20} |
| + tag = 'warm' |
| + |
| + @classmethod |
| + def Name(cls): |
| + return 'start_with_ext.warm.blank_page' |
| + |