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

Side by Side Diff: tools/perf/metrics/v8_object_stats.py

Issue 377343002: Update v8_object_stats to use results.AddValue(...) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import json 5 import json
6 import logging 6 import logging
7 7
8 from metrics import Metric 8 from metrics import Metric
9 from telemetry.value import scalar
10
9 11
10 _COUNTER_NAMES = [ 12 _COUNTER_NAMES = [
11 'V8.OsMemoryAllocated', 13 'V8.OsMemoryAllocated',
12 'V8.MemoryNewSpaceBytesAvailable', 14 'V8.MemoryNewSpaceBytesAvailable',
13 'V8.MemoryNewSpaceBytesCommitted', 15 'V8.MemoryNewSpaceBytesCommitted',
14 'V8.MemoryNewSpaceBytesUsed', 16 'V8.MemoryNewSpaceBytesUsed',
15 'V8.MemoryOldPointerSpaceBytesAvailable', 17 'V8.MemoryOldPointerSpaceBytesAvailable',
16 'V8.MemoryOldPointerSpaceBytesCommitted', 18 'V8.MemoryOldPointerSpaceBytesCommitted',
17 'V8.MemoryOldPointerSpaceBytesUsed', 19 'V8.MemoryOldPointerSpaceBytesUsed',
18 'V8.MemoryOldDataSpaceBytesAvailable', 20 'V8.MemoryOldDataSpaceBytesAvailable',
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 """Get the values in the stats table after the page is loaded.""" 208 """Get the values in the stats table after the page is loaded."""
207 self._results = V8ObjectStatsMetric.GetV8StatsTable(tab, self._counters) 209 self._results = V8ObjectStatsMetric.GetV8StatsTable(tab, self._counters)
208 if not self._results: 210 if not self._results:
209 logging.warning('No V8 object stats from website: ' + page.display_name) 211 logging.warning('No V8 object stats from website: ' + page.display_name)
210 212
211 def AddResults(self, tab, results): 213 def AddResults(self, tab, results):
212 """Add results for this page to the results object.""" 214 """Add results for this page to the results object."""
213 assert self._results != None, 'Must call Stop() first' 215 assert self._results != None, 'Must call Stop() first'
214 for counter_name in self._results: 216 for counter_name in self._results:
215 display_name = counter_name.replace('.', '_') 217 display_name = counter_name.replace('.', '_')
216 results.Add(display_name, 'kb', self._results[counter_name] / 1024.0) 218 results.AddValue(scalar.ScalarValue(
219 results.current_page, display_name, 'kb',
220 self._results[counter_name] / 1024.0))
OLDNEW
« 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