Chromium Code Reviews| 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 import re | 5 import re |
| 6 | 6 |
| 7 from core import perf_benchmark | 7 from core import perf_benchmark |
| 8 | 8 |
| 9 from telemetry import benchmark | 9 from telemetry import benchmark |
| 10 from telemetry.timeline import chrome_trace_category_filter | 10 from telemetry.timeline import chrome_trace_category_filter |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 return not possible_browser.platform.CanLaunchApplication( | 67 return not possible_browser.platform.CanLaunchApplication( |
| 68 'com.google.android.deskclock') | 68 'com.google.android.deskclock') |
| 69 | 69 |
| 70 @classmethod | 70 @classmethod |
| 71 def ValueCanBeAddedPredicate(cls, value, is_first_result): | 71 def ValueCanBeAddedPredicate(cls, value, is_first_result): |
| 72 # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard | 72 # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard |
| 73 # is able to cope with the data load generated by TBMv2 metrics. | 73 # is able to cope with the data load generated by TBMv2 metrics. |
| 74 return not _IGNORED_STATS_RE.search(value.name) | 74 return not _IGNORED_STATS_RE.search(value.name) |
| 75 | 75 |
| 76 | 76 |
| 77 # TODO(bashi): Workaround for http://crbug.com/532075. | |
|
petrcermak
2016/07/04 14:41:14
http://crbug.com/532075 is apparently fixed, so yo
| |
| 78 # @benchmark.Enabled('android') shouldn't be needed. | |
| 79 @benchmark.Enabled('android') | |
| 80 class MemoryBenchmarkTop10MobileStress(MemoryBenchmarkTop10Mobile): | |
| 81 """Run top 10 mobile page set without closing/restarting the browser. | |
| 82 | |
| 83 This benchmark is intended to stress-test the browser, catching memory leaks | |
| 84 or possible crashes after interacting with the browser for a period of time. | |
| 85 """ | |
| 86 @classmethod | |
| 87 def Name(cls): | |
| 88 return 'memory.top_10_mobile_stress' | |
| 89 | |
| 90 @classmethod | |
| 91 def ShouldTearDownStateAfterEachStorySetRun(cls): | |
| 92 return False | |
| 93 | |
| 94 | |
| 77 # Benchmark disabled by default. Force to run with --also-run-disabled-tests. | 95 # Benchmark disabled by default. Force to run with --also-run-disabled-tests. |
| 78 @benchmark.Disabled('all') | 96 @benchmark.Disabled('all') |
| 79 class DualBrowserBenchmark(_MemoryInfra): | 97 class DualBrowserBenchmark(_MemoryInfra): |
| 80 """Measures memory usage while interacting with two different browsers. | 98 """Measures memory usage while interacting with two different browsers. |
| 81 | 99 |
| 82 The user story involves going back and forth between doing Google searches | 100 The user story involves going back and forth between doing Google searches |
| 83 on a webview-based browser (a stand in for the Search app), and loading | 101 on a webview-based browser (a stand in for the Search app), and loading |
| 84 pages on a select browser. | 102 pages on a select browser. |
| 85 """ | 103 """ |
| 86 page_set = page_sets.DualBrowserStorySet | 104 page_set = page_sets.DualBrowserStorySet |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 201 of long running idle Gmail page """ | 219 of long running idle Gmail page """ |
| 202 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet | 220 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet |
| 203 | 221 |
| 204 @classmethod | 222 @classmethod |
| 205 def Name(cls): | 223 def Name(cls): |
| 206 return 'memory.long_running_idle_gmail_background_tbmv2' | 224 return 'memory.long_running_idle_gmail_background_tbmv2' |
| 207 | 225 |
| 208 @classmethod | 226 @classmethod |
| 209 def ShouldDisable(cls, possible_browser): # http://crbug.com/616530 | 227 def ShouldDisable(cls, possible_browser): # http://crbug.com/616530 |
| 210 return cls.IsSvelte(possible_browser) | 228 return cls.IsSvelte(possible_browser) |
| OLD | NEW |