| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 def ShouldTearDownStateAfterEachStoryRun(cls): | 77 def ShouldTearDownStateAfterEachStoryRun(cls): |
| 78 return True | 78 return True |
| 79 | 79 |
| 80 @classmethod | 80 @classmethod |
| 81 def ValueCanBeAddedPredicate(cls, value, is_first_result): | 81 def ValueCanBeAddedPredicate(cls, value, is_first_result): |
| 82 # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard | 82 # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard |
| 83 # is able to cope with the data load generated by TBMv2 metrics. | 83 # is able to cope with the data load generated by TBMv2 metrics. |
| 84 return not _IGNORED_STATS_RE.search(value.name) | 84 return not _IGNORED_STATS_RE.search(value.name) |
| 85 | 85 |
| 86 | 86 |
| 87 @benchmark.Enabled('mac') |
| 88 @benchmark.Enabled('win') |
| 89 @benchmark.Owner(emails=['erikchen@chromium.org']) |
| 90 class MemoryBenchmarkSitesDesktop(_MemoryInfra): |
| 91 """Measure memory usage on popular sites.""" |
| 92 options = {'pageset_repeat': 3} |
| 93 |
| 94 def CreateStorySet(self, options): |
| 95 return page_sets.DesktopMemoryPageSet() |
| 96 |
| 97 def SetExtraBrowserOptions(self, options): |
| 98 super(MemoryBenchmarkSitesDesktop, self).SetExtraBrowserOptions( |
| 99 options) |
| 100 options.AppendExtraBrowserArgs([ |
| 101 '--enable-heap-profiling=native', |
| 102 ]) |
| 103 # Disablr taking screen shot on failed pages for all perf benchmarks. |
| 104 options.take_screenshot_for_failed_page = False |
| 105 |
| 106 @classmethod |
| 107 def Name(cls): |
| 108 return 'memory.desktop_sites' |
| 109 |
| 110 @classmethod |
| 111 def ShouldTearDownStateAfterEachStoryRun(cls): |
| 112 return False |
| 113 |
| 114 @classmethod |
| 115 def ShouldTearDownStateAfterEachStorySetRun(cls): |
| 116 return False |
| 117 |
| 118 @classmethod |
| 119 def ValueCanBeAddedPredicate(cls, value, is_first_result): |
| 120 # TODO(crbug.com/610962): Remove this stopgap when the perf dashboard |
| 121 # is able to cope with the data load generated by TBMv2 metrics. |
| 122 return not _IGNORED_STATS_RE.search(value.name) |
| 123 |
| 124 |
| 125 |
| 87 @benchmark.Enabled('android') # catapult:#3176 | 126 @benchmark.Enabled('android') # catapult:#3176 |
| 88 @benchmark.Owner(emails=['perezju@chromium.org']) | 127 @benchmark.Owner(emails=['perezju@chromium.org']) |
| 89 class MemoryBenchmarkTop10Mobile(_MemoryInfra): | 128 class MemoryBenchmarkTop10Mobile(_MemoryInfra): |
| 90 """Measure foreground/background memory on top 10 mobile page set. | 129 """Measure foreground/background memory on top 10 mobile page set. |
| 91 | 130 |
| 92 This metric provides memory measurements for the System Health Plan of | 131 This metric provides memory measurements for the System Health Plan of |
| 93 Chrome on Android. | 132 Chrome on Android. |
| 94 """ | 133 """ |
| 95 page_set = page_sets.MemoryTop10Mobile | 134 page_set = page_sets.MemoryTop10Mobile |
| 96 options = {'pageset_repeat': 5} | 135 options = {'pageset_repeat': 5} |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 of long running idle Gmail page """ | 287 of long running idle Gmail page """ |
| 249 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet | 288 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet |
| 250 | 289 |
| 251 @classmethod | 290 @classmethod |
| 252 def Name(cls): | 291 def Name(cls): |
| 253 return 'memory.long_running_idle_gmail_background_tbmv2' | 292 return 'memory.long_running_idle_gmail_background_tbmv2' |
| 254 | 293 |
| 255 @classmethod | 294 @classmethod |
| 256 def ShouldDisable(cls, possible_browser): # http://crbug.com/616530 | 295 def ShouldDisable(cls, possible_browser): # http://crbug.com/616530 |
| 257 return cls.IsSvelte(possible_browser) | 296 return cls.IsSvelte(possible_browser) |
| OLD | NEW |