| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 def SetExtraBrowserOptions(self, options): | 44 def SetExtraBrowserOptions(self, options): |
| 45 # Just before we measure memory we flush the system caches | 45 # Just before we measure memory we flush the system caches |
| 46 # unfortunately this doesn't immediately take effect, instead | 46 # unfortunately this doesn't immediately take effect, instead |
| 47 # the next page run is effected. Due to this the first page run | 47 # the next page run is effected. Due to this the first page run |
| 48 # has anomalous results. This option causes us to flush caches | 48 # has anomalous results. This option causes us to flush caches |
| 49 # each time before Chrome starts so we effect even the first page | 49 # each time before Chrome starts so we effect even the first page |
| 50 # - avoiding the bug. | 50 # - avoiding the bug. |
| 51 options.clear_sytem_cache_for_browser_and_profile_on_start = True | 51 options.clear_sytem_cache_for_browser_and_profile_on_start = True |
| 52 | 52 |
| 53 | 53 |
| 54 @benchmark.Enabled('mac') |
| 55 @benchmark.Enabled('win') |
| 56 @benchmark.Owner(emails=['erikchen@chromium.org']) |
| 57 class MemoryBenchmarkTrivialSitesDesktop(_MemoryInfra): |
| 58 """Measure memory usage on trivial sites.""" |
| 59 page_set = page_sets.TrivialSitesStorySet |
| 60 options = {'pageset_repeat': 5} |
| 61 |
| 62 @classmethod |
| 63 def Name(cls): |
| 64 return 'memory.desktop' |
| 65 |
| 66 @classmethod |
| 67 def ShouldTearDownStateAfterEachStoryRun(cls): |
| 68 return True |
| 69 |
| 70 @classmethod |
| 71 def ValueCanBeAddedPredicate(cls, value, is_first_result): |
| 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. |
| 74 return not _IGNORED_STATS_RE.search(value.name) |
| 75 |
| 76 |
| 54 @benchmark.Enabled('android') # catapult:#3176 | 77 @benchmark.Enabled('android') # catapult:#3176 |
| 55 @benchmark.Owner(emails=['perezju@chromium.org']) | 78 @benchmark.Owner(emails=['perezju@chromium.org']) |
| 56 class MemoryBenchmarkTop10Mobile(_MemoryInfra): | 79 class MemoryBenchmarkTop10Mobile(_MemoryInfra): |
| 57 """Measure foreground/background memory on top 10 mobile page set. | 80 """Measure foreground/background memory on top 10 mobile page set. |
| 58 | 81 |
| 59 This metric provides memory measurements for the System Health Plan of | 82 This metric provides memory measurements for the System Health Plan of |
| 60 Chrome on Android. | 83 Chrome on Android. |
| 61 """ | 84 """ |
| 62 page_set = page_sets.MemoryTop10Mobile | 85 page_set = page_sets.MemoryTop10Mobile |
| 63 options = {'pageset_repeat': 5} | 86 options = {'pageset_repeat': 5} |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 of long running idle Gmail page """ | 269 of long running idle Gmail page """ |
| 247 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet | 270 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet |
| 248 | 271 |
| 249 @classmethod | 272 @classmethod |
| 250 def Name(cls): | 273 def Name(cls): |
| 251 return 'memory.long_running_idle_gmail_background_tbmv2' | 274 return 'memory.long_running_idle_gmail_background_tbmv2' |
| 252 | 275 |
| 253 @classmethod | 276 @classmethod |
| 254 def ShouldDisable(cls, possible_browser): # http://crbug.com/616530 | 277 def ShouldDisable(cls, possible_browser): # http://crbug.com/616530 |
| 255 return cls.IsSvelte(possible_browser) | 278 return cls.IsSvelte(possible_browser) |
| OLD | NEW |