| 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 class MemoryBenchmarkTop10MobileStress(MemoryBenchmarkTop10Mobile): |
| 78 """Run top 10 mobile page set without closing/restarting the browser. |
| 79 |
| 80 This benchmark is intended to stress-test the browser, catching memory leaks |
| 81 or possible crashes after interacting with the browser for a period of time. |
| 82 """ |
| 83 @classmethod |
| 84 def Name(cls): |
| 85 return 'memory.top_10_mobile_stress' |
| 86 |
| 87 @classmethod |
| 88 def ShouldTearDownStateAfterEachStorySetRun(cls): |
| 89 return False |
| 90 |
| 91 |
| 77 # Benchmark disabled by default. Force to run with --also-run-disabled-tests. | 92 # Benchmark disabled by default. Force to run with --also-run-disabled-tests. |
| 78 @benchmark.Disabled('all') | 93 @benchmark.Disabled('all') |
| 79 class DualBrowserBenchmark(_MemoryInfra): | 94 class DualBrowserBenchmark(_MemoryInfra): |
| 80 """Measures memory usage while interacting with two different browsers. | 95 """Measures memory usage while interacting with two different browsers. |
| 81 | 96 |
| 82 The user story involves going back and forth between doing Google searches | 97 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 | 98 on a webview-based browser (a stand in for the Search app), and loading |
| 84 pages on a select browser. | 99 pages on a select browser. |
| 85 """ | 100 """ |
| 86 page_set = page_sets.DualBrowserStorySet | 101 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 """ | 216 of long running idle Gmail page """ |
| 202 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet | 217 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet |
| 203 | 218 |
| 204 @classmethod | 219 @classmethod |
| 205 def Name(cls): | 220 def Name(cls): |
| 206 return 'memory.long_running_idle_gmail_background_tbmv2' | 221 return 'memory.long_running_idle_gmail_background_tbmv2' |
| 207 | 222 |
| 208 @classmethod | 223 @classmethod |
| 209 def ShouldDisable(cls, possible_browser): # http://crbug.com/616530 | 224 def ShouldDisable(cls, possible_browser): # http://crbug.com/616530 |
| 210 return cls.IsSvelte(possible_browser) | 225 return cls.IsSvelte(possible_browser) |
| OLD | NEW |