| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 from core import perf_benchmark | 5 from core import perf_benchmark |
| 6 import page_sets | 6 import page_sets |
| 7 | 7 |
| 8 from telemetry import benchmark | 8 from telemetry import benchmark |
| 9 from telemetry.timeline import chrome_trace_category_filter | 9 from telemetry.timeline import chrome_trace_category_filter |
| 10 from telemetry.web_perf import timeline_based_measurement | 10 from telemetry.web_perf import timeline_based_measurement |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 options = timeline_based_measurement.Options( | 26 options = timeline_based_measurement.Options( |
| 27 overhead_level=startup_category_filter) | 27 overhead_level=startup_category_filter) |
| 28 options.SetLegacyTimelineBasedMetrics( | 28 options.SetLegacyTimelineBasedMetrics( |
| 29 [startup.StartupTimelineMetric()]) | 29 [startup.StartupTimelineMetric()]) |
| 30 return options | 30 return options |
| 31 | 31 |
| 32 | 32 |
| 33 @benchmark.Enabled('has tabs') | 33 @benchmark.Enabled('has tabs') |
| 34 @benchmark.Enabled('android') | 34 @benchmark.Enabled('android') |
| 35 @benchmark.Disabled('chromeos', 'linux', 'mac', 'win') | 35 @benchmark.Disabled('chromeos', 'linux', 'mac', 'win') |
| 36 @benchmark.Owner(emails=['pasko@chromium.org']) |
| 36 class StartWithUrlColdTBM(_StartupPerfBenchmark): | 37 class StartWithUrlColdTBM(_StartupPerfBenchmark): |
| 37 """Measures time to start Chrome cold with startup URLs.""" | 38 """Measures time to start Chrome cold with startup URLs.""" |
| 38 | 39 |
| 39 page_set = page_sets.StartupPagesPageSet | 40 page_set = page_sets.StartupPagesPageSet |
| 40 options = {'pageset_repeat': 5} | 41 options = {'pageset_repeat': 5} |
| 41 | 42 |
| 42 def SetExtraBrowserOptions(self, options): | 43 def SetExtraBrowserOptions(self, options): |
| 43 options.clear_sytem_cache_for_browser_and_profile_on_start = True | 44 options.clear_sytem_cache_for_browser_and_profile_on_start = True |
| 44 super(StartWithUrlColdTBM, self).SetExtraBrowserOptions(options) | 45 super(StartWithUrlColdTBM, self).SetExtraBrowserOptions(options) |
| 45 | 46 |
| 46 @classmethod | 47 @classmethod |
| 47 def ShouldDisable(cls, possible_browser): # http://crbug.com/667470 | 48 def ShouldDisable(cls, possible_browser): # http://crbug.com/667470 |
| 48 return (possible_browser.platform.GetDeviceTypeName() in | 49 return (possible_browser.platform.GetDeviceTypeName() in |
| 49 ['Nexus 7v2', 'Nexus 9']) | 50 ['Nexus 7v2', 'Nexus 9']) |
| 50 | 51 |
| 51 @classmethod | 52 @classmethod |
| 52 def Name(cls): | 53 def Name(cls): |
| 53 return 'start_with_url.cold.startup_pages' | 54 return 'start_with_url.cold.startup_pages' |
| 54 | 55 |
| 55 | 56 |
| 56 @benchmark.Enabled('has tabs') | 57 @benchmark.Enabled('has tabs') |
| 57 @benchmark.Enabled('android') | 58 @benchmark.Enabled('android') |
| 58 @benchmark.Disabled('android-reference') # crbug.com/588786 | 59 @benchmark.Disabled('android-reference') # crbug.com/588786 |
| 59 @benchmark.Disabled('chromeos', 'linux', 'mac', 'win') | 60 @benchmark.Disabled('chromeos', 'linux', 'mac', 'win') |
| 61 @benchmark.Owner(emails=['pasko@chromium.org']) |
| 60 class StartWithUrlWarmTBM(_StartupPerfBenchmark): | 62 class StartWithUrlWarmTBM(_StartupPerfBenchmark): |
| 61 """Measures stimetime to start Chrome warm with startup URLs.""" | 63 """Measures stimetime to start Chrome warm with startup URLs.""" |
| 62 | 64 |
| 63 page_set = page_sets.StartupPagesPageSet | 65 page_set = page_sets.StartupPagesPageSet |
| 64 options = {'pageset_repeat': 11} | 66 options = {'pageset_repeat': 11} |
| 65 | 67 |
| 66 @classmethod | 68 @classmethod |
| 67 def Name(cls): | 69 def Name(cls): |
| 68 return 'start_with_url.warm.startup_pages' | 70 return 'start_with_url.warm.startup_pages' |
| 69 | 71 |
| 70 @classmethod | 72 @classmethod |
| 71 def ValueCanBeAddedPredicate(cls, value, is_first_result): | 73 def ValueCanBeAddedPredicate(cls, value, is_first_result): |
| 72 del value # unused | 74 del value # unused |
| 73 # Ignores first results because the first invocation is actualy cold since | 75 # Ignores first results because the first invocation is actualy cold since |
| 74 # we are loading the profile for the first time. | 76 # we are loading the profile for the first time. |
| 75 return not is_first_result | 77 return not is_first_result |
| OLD | NEW |