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

Unified Diff: tools/perf/core/perf_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, 4 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 | « tools/perf/benchmarks/renderer_memory.py ('k') | tools/perf/page_sets/blink_memory_mobile.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/core/perf_benchmark.py
diff --git a/tools/perf/core/perf_benchmark.py b/tools/perf/core/perf_benchmark.py
index fa29bf988ddc33ea93af76b021c12417af41ab59..2b7c14a7045bc15e290c51caac77bb35a1052628 100644
--- a/tools/perf/core/perf_benchmark.py
+++ b/tools/perf/core/perf_benchmark.py
@@ -7,6 +7,8 @@ import sys
from telemetry import benchmark
from telemetry.internal.browser import browser_finder
+from telemetry.timeline import tracing_category_filter
+from telemetry.web_perf import timeline_based_measurement
sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir,
os.pardir, 'variations'))
@@ -58,3 +60,19 @@ class PerfBenchmark(benchmark.Benchmark):
os.path.join(variations_dir,
'fieldtrial_testing_config_%s.json' % self._FixupTargetOS(
possible_browser.target_os)))
+
+
+class _MemoryBenchmark(PerfBenchmark):
nednguyen 2015/09/01 22:40:17 Err, I suggest you to put _MemoryBenchmark & Rende
bashi 2015/09/01 23:00:36 Ah, I see. Done. Renamed memory_health_plan.py to
+ """Base class for timeline based memory benchmark."""
+
+ def SetExtraBrowserOptions(self, options):
+ # TODO(perezju): Temporary workaround to disable periodic memory dumps.
+ # See: http://crbug.com/513692
+ options.AppendExtraBrowserArgs('--enable-memory-benchmarking')
+
+ 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.
+ trace_memory = tracing_category_filter.TracingCategoryFilter(
+ filter_string='-*,blink.console,disabled-by-default-memory-infra')
+ return timeline_based_measurement.Options(overhead_level=trace_memory)
« no previous file with comments | « tools/perf/benchmarks/renderer_memory.py ('k') | tools/perf/page_sets/blink_memory_mobile.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698