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

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

Issue 1773103002: Replace memory.long_running_idle_gmail with TBM based version. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from perezju Created 4 years, 9 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 | « tools/perf/benchmarks/memory.py ('k') | tools/perf/page_sets/long_running_idle_google_cases.py » ('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
11 from telemetry.web_perf import timeline_based_measurement 11 from telemetry.web_perf import timeline_based_measurement
12 from telemetry.web_perf.metrics import memory_timeline 12 from telemetry.web_perf.metrics import memory_timeline
13 from telemetry.web_perf.metrics import v8_gc_latency
13 14
14 import page_sets 15 import page_sets
15 16
16 17
17 class _MemoryInfra(perf_benchmark.PerfBenchmark): 18 class _MemoryInfra(perf_benchmark.PerfBenchmark):
18 """Base class for new-generation memory benchmarks based on memory-infra. 19 """Base class for new-generation memory benchmarks based on memory-infra.
19 20
20 This benchmark records data using memory-infra (https://goo.gl/8tGc6O), which 21 This benchmark records data using memory-infra (https://goo.gl/8tGc6O), which
21 is part of chrome tracing, and extracts it using timeline-based measurements. 22 is part of chrome tracing, and extracts it using timeline-based measurements.
22 """ 23 """
(...skipping 13 matching lines...) Expand all
36 tbm_options = timeline_based_measurement.Options( 37 tbm_options = timeline_based_measurement.Options(
37 overhead_level=trace_memory) 38 overhead_level=trace_memory)
38 tbm_options.config.enable_android_graphics_memtrack = True 39 tbm_options.config.enable_android_graphics_memtrack = True
39 return tbm_options 40 return tbm_options
40 41
41 @classmethod 42 @classmethod
42 def HasBenchmarkTraceRerunDebugOption(cls): 43 def HasBenchmarkTraceRerunDebugOption(cls):
43 return True 44 return True
44 45
45 def SetupBenchmarkDefaultTraceRerunOptions(self, tbm_options): 46 def SetupBenchmarkDefaultTraceRerunOptions(self, tbm_options):
47 # TODO(perezju): Call this function for TBM benchmarks: crbug.com/593678
46 tbm_options.SetLegacyTimelineBasedMetrics(( 48 tbm_options.SetLegacyTimelineBasedMetrics((
47 memory_timeline.MemoryTimelineMetric(), 49 memory_timeline.MemoryTimelineMetric(),
48 )) 50 ))
49 51
50 52
51 # TODO(bashi): Workaround for http://crbug.com/532075 53 # TODO(bashi): Workaround for http://crbug.com/532075
52 # @benchmark.Enabled('android') shouldn't be needed. 54 # @benchmark.Enabled('android') shouldn't be needed.
53 @benchmark.Enabled('android') 55 @benchmark.Enabled('android')
54 class MemoryHealthPlan(_MemoryInfra): 56 class MemoryHealthPlan(_MemoryInfra):
55 """Timeline based benchmark for the Memory Health Plan.""" 57 """Timeline based benchmark for the Memory Health Plan."""
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 # Tracing.requestMemoryDump DevTools API. See http://crbug.com/540022. 110 # Tracing.requestMemoryDump DevTools API. See http://crbug.com/540022.
109 @benchmark.Disabled('reference') 111 @benchmark.Disabled('reference')
110 class MemoryBenchmarkTop10Mobile(_MemoryInfra): 112 class MemoryBenchmarkTop10Mobile(_MemoryInfra):
111 """Timeline based benchmark for measuring memory on top 10 mobile sites.""" 113 """Timeline based benchmark for measuring memory on top 10 mobile sites."""
112 114
113 page_set = page_sets.MemoryInfraTop10MobilePageSet 115 page_set = page_sets.MemoryInfraTop10MobilePageSet
114 116
115 @classmethod 117 @classmethod
116 def Name(cls): 118 def Name(cls):
117 return 'memory.top_10_mobile' 119 return 'memory.top_10_mobile'
120
121
122 # Disabled on reference builds because they don't support the new
123 # Tracing.requestMemoryDump DevTools API.
124 # For 'reference' see http://crbug.com/540022.
125 # For 'android' see http://crbug.com/579546.
126 @benchmark.Disabled('reference', 'android')
127 class MemoryLongRunningIdleGmailTBM(_MemoryInfra):
128 """Use (recorded) real world web sites and measure memory consumption
129 of long running idle Gmail page """
130 page_set = page_sets.LongRunningIdleGmailPageSet
131
132 def CreateTimelineBasedMeasurementOptions(self):
133 v8_categories = [
134 'blink.console', 'renderer.scheduler', 'v8', 'webkit.console']
135 memory_categories = 'blink.console,disabled-by-default-memory-infra'
136 category_filter = tracing_category_filter.TracingCategoryFilter(
137 memory_categories)
138 for category in v8_categories:
139 category_filter.AddIncludedCategory(category)
140 options = timeline_based_measurement.Options(category_filter)
141 options.SetLegacyTimelineBasedMetrics([
142 v8_gc_latency.V8GCLatency(),
143 memory_timeline.MemoryTimelineMetric()])
144 return options
145
146 @classmethod
147 def Name(cls):
148 return 'memory.long_running_idle_gmail_tbm'
149
150 @classmethod
151 def ShouldTearDownStateAfterEachStoryRun(cls):
152 return True
OLDNEW
« no previous file with comments | « tools/perf/benchmarks/memory.py ('k') | tools/perf/page_sets/long_running_idle_google_cases.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698