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

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: Move to memory-infra 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
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 # Tracing.requestMemoryDump DevTools API. See http://crbug.com/540022. 109 # Tracing.requestMemoryDump DevTools API. See http://crbug.com/540022.
109 @benchmark.Disabled('reference') 110 @benchmark.Disabled('reference')
110 class MemoryBenchmarkTop10Mobile(_MemoryInfra): 111 class MemoryBenchmarkTop10Mobile(_MemoryInfra):
111 """Timeline based benchmark for measuring memory on top 10 mobile sites.""" 112 """Timeline based benchmark for measuring memory on top 10 mobile sites."""
112 113
113 page_set = page_sets.MemoryInfraTop10MobilePageSet 114 page_set = page_sets.MemoryInfraTop10MobilePageSet
114 115
115 @classmethod 116 @classmethod
116 def Name(cls): 117 def Name(cls):
117 return 'memory.top_10_mobile' 118 return 'memory.top_10_mobile'
119
120
121 # Disabled on reference builds because they don't support the new
122 # Tracing.requestMemoryDump DevTools API. See http://crbug.com/540022.
123 @benchmark.Disabled('reference', 'android') # crbug.com/579546
perezju 2016/03/10 09:34:36 nit: add a short sentence explaining why it's disa
ulan 2016/03/10 11:09:25 Done.
124 class MemoryLongRunningIdleGmailTBM(_MemoryInfra):
125 """Use (recorded) real world web sites and measure memory consumption
126 of long running idle Gmail page """
127 page_set = page_sets.LongRunningIdleGmailPageSet
128
129 def CreateTimelineBasedMeasurementOptions(self):
130 v8_categories = [
131 'blink.console', 'renderer.scheduler', 'v8', 'webkit.console']
132 memory_categories = 'blink.console,disabled-by-default-memory-infra'
133 category_filter = tracing_category_filter.TracingCategoryFilter(
134 memory_categories)
135 for category in v8_categories:
136 category_filter.AddIncludedCategory(category)
137 options = timeline_based_measurement.Options(category_filter)
138 options.SetLegacyTimelineBasedMetrics([
139 v8_gc_latency.V8GCLatency(),
140 memory_timeline.MemoryTimelineMetric()])
141 return options
142
143 @classmethod
144 def Name(cls):
145 return 'memory.long_running_idle_gmail_tbm'
146
147 @classmethod
148 def ShouldTearDownStateAfterEachStoryRun(cls):
149 return True
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698