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

Unified Diff: tools/perf/metrics/v8_object_stats.py

Issue 99903009: Allowing V8ObjectStatsMetric users to specify metrics to capture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 12 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/metrics/v8_object_stats.py
diff --git a/tools/perf/metrics/v8_object_stats.py b/tools/perf/metrics/v8_object_stats.py
index d9d35f4337ee1552fed77be541217d7612a9376d..33803da64fc7da27b4d5e2da3dcf5348f011fd05 100644
--- a/tools/perf/metrics/v8_object_stats.py
+++ b/tools/perf/metrics/v8_object_stats.py
@@ -162,9 +162,10 @@ class V8ObjectStatsMetric(Metric):
these statistics from the StatsTableMetric.
"""
- def __init__(self):
+ def __init__(self, counters=None):
super(V8ObjectStatsMetric, self).__init__()
self._results = None
+ self._counters = counters or _COUNTER_NAMES
@classmethod
def CustomizeBrowserOptions(cls, options):
@@ -204,7 +205,7 @@ class V8ObjectStatsMetric(Metric):
def Stop(self, page, tab):
"""Get the values in the stats table after the page is loaded."""
- self._results = V8ObjectStatsMetric.GetV8StatsTable(tab)
+ self._results = V8ObjectStatsMetric.GetV8StatsTable(tab, self._counters)
if not self._results:
logging.warning('No V8 object stats from website: ' + page.display_name)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698