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

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

Issue 2006223008: Reland of Memory Infra: Replace memory_health_plan with top_10_mobile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: keep old benchmark name 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(perezju): Remove when all bots are updated to the new benchmark name.
petrcermak 2016/05/26 09:51:23 supernit: Missing space between '#' and 'TODO' O:-
86 @benchmark.Disabled('all')
87 class MemoryHealthPlan(MemoryBenchmarkTop10Mobile):
88 """Alias of memory.top_10_mobile. (Deprecated)"""
petrcermak 2016/05/26 09:51:23 supernit: I would put the period after the closing
89 @classmethod
90 def Name(cls):
91 return 'memory.memory_health_plan'
92
93
94 # TODO(bashi): Workaround for http://crbug.com/532075.
95 # @benchmark.Enabled('android') shouldn't be needed.
80 @benchmark.Enabled('android') 96 @benchmark.Enabled('android')
81 class TBMv2MemoryBenchmarkTop10Mobile(MemoryHealthPlan): 97 class TBMv2MemoryBenchmarkTop10Mobile(MemoryBenchmarkTop10Mobile):
82 """Timeline based benchmark for the Memory Health Plan based on TBMv2. 98 """Measure foreground/background memory on top 10 mobile page set (TBMv2).
83 99
84 This is a temporary benchmark to compare the new TBMv2 memory metric 100 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 101 (memory_metric.html) with the existing TBMv1 one (memory_timeline.py). Once
86 all issues associated with the TBMv2 metric are resolved, all memory 102 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 103 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 104 of the TBMv1 metric and this temporary benchmark will be removed. See
89 crbug.com/60361. 105 crbug.com/60361.
90 """ 106 """
91 TBM_VERSION = 2 107 TBM_VERSION = 2
92 108
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 198
183 @benchmark.Enabled('has tabs') # http://crbug.com/612210 199 @benchmark.Enabled('has tabs') # http://crbug.com/612210
184 class MemoryLongRunningIdleGmailBackground(_MemoryV8Benchmark): 200 class MemoryLongRunningIdleGmailBackground(_MemoryV8Benchmark):
185 """Use (recorded) real world web sites and measure memory consumption 201 """Use (recorded) real world web sites and measure memory consumption
186 of long running idle Gmail page """ 202 of long running idle Gmail page """
187 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet 203 page_set = page_sets.LongRunningIdleGmailBackgroundPageSet
188 204
189 @classmethod 205 @classmethod
190 def Name(cls): 206 def Name(cls):
191 return 'memory.long_running_idle_gmail_background_tbmv2' 207 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