Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: tools/perf/benchmarks/memory_infra.py

Issue 1936533002: Memory Infra: Replace memory_health_plan with top_10_mobile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/perf/page_sets/data/memory_health_plan.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 tracing_category_filter 10 from telemetry.timeline import tracing_category_filter
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 )) 52 ))
53 elif self.TBM_VERSION == 2: 53 elif self.TBM_VERSION == 2:
54 # TBMv2 (see tracing/tracing/metrics/system_health/memory_metric.html 54 # TBMv2 (see tracing/tracing/metrics/system_health/memory_metric.html
55 # in third_party/catapult). 55 # in third_party/catapult).
56 tbm_options.SetTimelineBasedMetric('memoryMetric') 56 tbm_options.SetTimelineBasedMetric('memoryMetric')
57 else: 57 else:
58 raise Exception('Unrecognized TBM version: %s' % self.TBM_VERSION) 58 raise Exception('Unrecognized TBM version: %s' % self.TBM_VERSION)
59 return tbm_options 59 return tbm_options
60 60
61 61
62 # TODO(crbug.com/606361): Remove benchmark when replaced by the TBMv2 version. 62 # TODO(bashi): Workaround for http://crbug.com/532075.
63 @benchmark.Disabled('all') 63 # @benchmark.Enabled('android') shouldn't be needed.
64 class MemoryHealthPlan(_MemoryInfra): 64 @benchmark.Enabled('android')
65 """Timeline based benchmark for the Memory Health Plan.""" 65 class MemoryBenchmarkTop10Mobile(_MemoryInfra):
66 page_set = page_sets.MemoryHealthStory 66 """Measure foreground/background memory on top 10 mobile page set.
67
68 This metric provides memory measurements for the System Health Plan of
69 Chrome on Android.
70 """
71 page_set = page_sets.MemoryTop10Mobile
67 options = {'pageset_repeat': 5} 72 options = {'pageset_repeat': 5}
68 73
69 @classmethod 74 @classmethod
70 def Name(cls): 75 def Name(cls):
71 return 'memory.memory_health_plan' 76 return 'memory.top_10_mobile'
72 77
73 @classmethod 78 @classmethod
74 def ShouldDisable(cls, possible_browser): 79 def ShouldDisable(cls, possible_browser):
75 # TODO(crbug.com/586148): Benchmark should not depend on DeskClock app. 80 # TODO(crbug.com/586148): Benchmark should not depend on DeskClock app.
76 return not possible_browser.platform.CanLaunchApplication( 81 return not possible_browser.platform.CanLaunchApplication(
77 'com.google.android.deskclock') 82 'com.google.android.deskclock')
78 83
79 84
85 # TODO(bashi): Workaround for http://crbug.com/532075.
86 # @benchmark.Enabled('android') shouldn't be needed.
80 @benchmark.Enabled('android') 87 @benchmark.Enabled('android')
81 class TBMv2MemoryBenchmarkTop10Mobile(MemoryHealthPlan): 88 class TBMv2MemoryBenchmarkTop10Mobile(MemoryBenchmarkTop10Mobile):
82 """Timeline based benchmark for the Memory Health Plan based on TBMv2. 89 """Measure foreground/background memory on top 10 mobile page set (TBMv2).
83 90
84 This is a temporary benchmark to compare the new TBMv2 memory metric 91 This is a temporary benchmark to compare the new TBMv2 memory metric
85 (memory_metric.html) with the existing TBMv1 one (memory_timeline.py). Once 92 (memory_metric.html) with the existing TBMv1 one (memory_timeline.py). Once
86 all issues associated with the TBMv2 metric are resolved, all memory 93 all issues associated with the TBMv2 metric are resolved, all memory
87 benchmarks (including the ones in this file) will switch to use it instead 94 benchmarks (including the ones in this file) will switch to use it instead
88 of the TBMv1 metric and this temporary benchmark will be removed. See 95 of the TBMv1 metric and this temporary benchmark will be removed. See
89 crbug.com/60361. 96 crbug.com/60361.
90 """ 97 """
91 TBM_VERSION = 2 98 TBM_VERSION = 2
92 99
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 189
183 @benchmark.Enabled('has tabs') # http://crbug.com/612210 190 @benchmark.Enabled('has tabs') # http://crbug.com/612210
184 class MemoryLongRunningIdleGmailBackground(_MemoryV8Benchmark): 191 class MemoryLongRunningIdleGmailBackground(_MemoryV8Benchmark):
185 """Use (recorded) real world web sites and measure memory consumption 192 """Use (recorded) real world web sites and measure memory consumption
186 of long running idle Gmail page """ 193 of long running idle Gmail page """
187 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet 194 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet
188 195
189 @classmethod 196 @classmethod
190 def Name(cls): 197 def Name(cls):
191 return 'memory.long_running_idle_gmail_background_tbmv2' 198 return 'memory.long_running_idle_gmail_background_tbmv2'
OLDNEW
« no previous file with comments | « no previous file | tools/perf/page_sets/data/memory_health_plan.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698