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

Unified Diff: tools/perf/benchmarks/memory_infra.py

Issue 1907343002: Set up a parallel memory.memory_health_quick_tbmv2 benchmark (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: tools/perf/benchmarks/memory_infra.py
diff --git a/tools/perf/benchmarks/memory_infra.py b/tools/perf/benchmarks/memory_infra.py
index 40f09ad89e465ad4fa468da18a3ba623007c9e1e..7f31b0bec07665233b12269558d3e35b8f85e320 100644
--- a/tools/perf/benchmarks/memory_infra.py
+++ b/tools/perf/benchmarks/memory_infra.py
@@ -29,6 +29,15 @@ class _MemoryInfra(perf_benchmark.PerfBenchmark):
'--enable-memory-benchmarking',
])
+
+class _TBMv1MemoryInfra(_MemoryInfra):
perezju 2016/04/25 09:03:49 As per the discussion in https://github.com/catapu
petrcermak 2016/04/25 10:00:35 Done.
perezju 2016/04/25 11:24:00 Awesome! Looks much better.
+ """Base class for memory benchmarks based on TBMv1 memory-infra.
+
+ See
+ third_party/catapult/telemetry/telemetry/web_perf/metrics/memory_timeline.py
+ for more details about the Timeline Based Measurement v1 memory metric.
+ """
+
def CreateTimelineBasedMeasurementOptions(self):
# Enable only memory-infra, to get memory dumps, and blink.console, to get
# the timeline markers used for mapping threads to tabs.
@@ -49,10 +58,25 @@ class _MemoryInfra(perf_benchmark.PerfBenchmark):
))
+class _TBMv2MemoryInfra(_MemoryInfra):
+ """Base class for memory benchmarks based on TBMv2 memory-infra.
+
+ See
+ third_party/catapult/tracing/tracing/metrics/system_health/memory_metric.html
+ for more details about the Timeline Based Measurement v2 memory metric.
+ """
+
+ def CreateTimelineBasedMeasurementOptions(self):
+ tbm_options = super(
+ _TBMv2MemoryInfra, self).CreateTimelineBasedMeasurementOptions()
+ tbm_options.SetTimelineBasedMetric('memoryMetric')
+ return tbm_options
+
+
# TODO(bashi): Workaround for http://crbug.com/532075
# @benchmark.Enabled('android') shouldn't be needed.
@benchmark.Enabled('android')
-class MemoryHealthQuick(_MemoryInfra):
+class MemoryHealthQuick(_TBMv1MemoryInfra):
"""Timeline based benchmark for the Memory Health Plan (1 iteration)."""
page_set = page_sets.MemoryHealthStory
@@ -78,10 +102,31 @@ class MemoryHealthPlan(MemoryHealthQuick):
return 'memory.memory_health_plan'
+@benchmark.Enabled('android')
+class TBMv2MemoryHealthQuick(_TBMv2MemoryInfra):
+ """Timeline based benchmark for the Memory Health Plan based on TBMv2.
+
+ This is a temporary benchmark to compare the new TBMv2 memory metric
+ (memory_metric.html) with the existing TBMv1 one (memory_timeline.py). Once
+ all issues associated with the TBMv2 metric are resolved, all memory
+ benchmarks (including the ones in this file) will switch to use it instead
+ of the TBMv1 metric and this temporary benchmark will be removed.
+ """
+ page_set = MemoryHealthQuick.page_set
+
+ @classmethod
+ def Name(cls):
+ return MemoryHealthQuick.Name() + '_tbmv2'
+
+ @classmethod
+ def ShouldDisable(cls, possible_browser):
+ return MemoryHealthQuick.ShouldDisable(possible_browser)
+
+
# TODO(bashi): Workaround for http://crbug.com/532075
# @benchmark.Enabled('android') shouldn't be needed.
@benchmark.Enabled('android')
-class RendererMemoryBlinkMemoryMobile(_MemoryInfra):
+class RendererMemoryBlinkMemoryMobile(_TBMv1MemoryInfra):
"""Timeline based benchmark for measuring memory consumption on mobile
sites on which blink's memory consumption is relatively high."""
@@ -110,7 +155,7 @@ class RendererMemoryBlinkMemoryMobile(_MemoryInfra):
# Disabled on reference builds because they don't support the new
# Tracing.requestMemoryDump DevTools API. See http://crbug.com/540022.
@benchmark.Disabled('reference')
-class MemoryBenchmarkTop10Mobile(_MemoryInfra):
+class MemoryBenchmarkTop10Mobile(_TBMv1MemoryInfra):
"""Timeline based benchmark for measuring memory on top 10 mobile sites."""
page_set = page_sets.MemoryInfraTop10MobilePageSet
@@ -125,7 +170,7 @@ class MemoryBenchmarkTop10Mobile(_MemoryInfra):
# For 'reference' see http://crbug.com/540022.
# For 'android' see http://crbug.com/579546.
@benchmark.Disabled('reference', 'android')
-class MemoryLongRunningIdleGmailTBM(_MemoryInfra):
+class MemoryLongRunningIdleGmailTBM(_TBMv1MemoryInfra):
"""Use (recorded) real world web sites and measure memory consumption
of long running idle Gmail page """
page_set = page_sets.LongRunningIdleGmailPageSet
« no previous file with comments | « no previous file | tools/perf/page_sets/memory_health_story.py » ('j') | tools/perf/page_sets/memory_health_story.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698