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

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

Issue 1266833004: telemetry: Add a page set for blink's memory usage measurement (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | tools/perf/benchmarks/memory_health_plan.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/benchmarks/memory_benchmark.py
diff --git a/tools/perf/benchmarks/memory_health_plan.py b/tools/perf/benchmarks/memory_benchmark.py
similarity index 61%
rename from tools/perf/benchmarks/memory_health_plan.py
rename to tools/perf/benchmarks/memory_benchmark.py
index 14be34cbf3f10ca62aec10f793ad8f95beee3e28..c0c266577a551eb1a4b4392e4d71e280c90123eb 100644
--- a/tools/perf/benchmarks/memory_health_plan.py
+++ b/tools/perf/benchmarks/memory_benchmark.py
@@ -13,14 +13,8 @@ from telemetry.web_perf import timeline_based_measurement
import page_sets
-RE_BENCHMARK_VALUES = re.compile('(fore|back)ground-memory_')
-
-
-@benchmark.Enabled('android')
-class MemoryHealthPlan(perf_benchmark.PerfBenchmark):
- """Timeline based benchmark for the Memory Health Plan."""
-
- page_set = page_sets.MemoryHealthStory
+class _MemoryBenchmark(perf_benchmark.PerfBenchmark):
+ """Base class for timeline based memory benchmarks."""
def SetExtraBrowserOptions(self, options):
# TODO(perezju): Temporary workaround to disable periodic memory dumps.
@@ -34,10 +28,36 @@ class MemoryHealthPlan(perf_benchmark.PerfBenchmark):
filter_string='-*,blink.console,disabled-by-default-memory-infra')
return timeline_based_measurement.Options(overhead_level=trace_memory)
+
+@benchmark.Enabled('android')
nednguyen 2015/09/04 02:01:28 Removed?
bashi 2015/09/04 02:37:11 Forgot to remove this.. Done.
+class MemoryHealthPlan(_MemoryBenchmark):
+ """Timeline based benchmark for the Memory Health Plan."""
+
+ _RE_BENCHMARK_VALUES = re.compile('(fore|back)ground-memory_')
+
+ page_set = page_sets.MemoryHealthStory
+
@classmethod
def Name(cls):
return 'memory.memory_health_plan'
@classmethod
def ValueCanBeAddedPredicate(cls, value, is_first_result):
- return bool(RE_BENCHMARK_VALUES.match(value.name))
+ return bool(cls._RE_BENCHMARK_VALUES.match(value.name))
+
+
+class RendererMemoryBlinkMemoryMobile(_MemoryBenchmark):
+ """Timeline based benchmark for measuring memory consumption on mobile
+ sites on which blink's memory consumption is relatively high."""
+
+ _RE_RENDERER_VALUES = re.compile('.+-memory_.+_renderer')
+
+ page_set = page_sets.BlinkMemoryMobilePageSet
+
+ @classmethod
+ def Name(cls):
+ return 'memory.blink_memory_mobile'
+
+ @classmethod
+ def ValueCanBeAddedPredicate(cls, value, is_first_result):
+ return bool(cls._RE_RENDERER_VALUES.match(value.name))
« no previous file with comments | « no previous file | tools/perf/benchmarks/memory_health_plan.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698