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

Unified Diff: tools/perf/measurements/media.py

Issue 105753006: Revert "Revert 239784 "Make page_cycler.py fully measure memory for each..."" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Shadi's comment Created 7 years 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 | « build/android/pylib/android_commands.py ('k') | tools/perf/measurements/memory.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/measurements/media.py
diff --git a/tools/perf/measurements/media.py b/tools/perf/measurements/media.py
index e02df6f0851a9259faec00325af6cea81048da6b..867a9b9b2c8e1678c3b4862d674284c5310707b3 100644
--- a/tools/perf/measurements/media.py
+++ b/tools/perf/measurements/media.py
@@ -27,6 +27,9 @@ class Media(page_measurement.PageMeasurement):
"""Results can vary from page to page based on media events taking place."""
return False
+ def CustomizeBrowserOptions(self, options):
+ memory.MemoryMetric.CustomizeBrowserOptions(options)
+
def DidNavigateToPage(self, page, tab):
"""Override to do operations right after the page is navigated."""
self._media_metric = media.MediaMetric(tab)
@@ -40,9 +43,8 @@ class Media(page_measurement.PageMeasurement):
if self._add_browser_metrics:
self._cpu_metric = cpu.CpuMetric(tab.browser)
self._cpu_metric.Start(page, tab)
- # No need to start memory metric since we are only interested in Summary
- # results.
self._memory_metric = memory.MemoryMetric(tab.browser)
+ self._memory_metric.Start(page, tab)
def MeasurePage(self, page, tab, results):
"""Measure the page's performance."""
@@ -51,4 +53,5 @@ class Media(page_measurement.PageMeasurement):
if self._add_browser_metrics:
self._cpu_metric.Stop(page, tab)
self._cpu_metric.AddResults(tab, results, trace_name=trace_name)
- self._memory_metric.AddSummaryResults(results, trace_name=trace_name)
+ self._memory_metric.Stop(page, tab)
+ self._memory_metric.AddResults(tab, results, trace_name=trace_name)
« no previous file with comments | « build/android/pylib/android_commands.py ('k') | tools/perf/measurements/memory.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698