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

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

Issue 391183002: Delete trace-info.json. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed descriptions in smoothness_controller. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/perf/metrics/memory.py ('k') | tools/perf/trace-info.json » ('j') | 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 4580b9c8fb06c56b3155b238083812ce62a4d384..a085125a91769440be4034be183b29a1518ea911 100644
--- a/tools/perf/metrics/v8_object_stats.py
+++ b/tools/perf/metrics/v8_object_stats.py
@@ -154,8 +154,19 @@ _COUNTER_NAMES = [
'V8.SizeOf_STRING_TYPE',
'V8.SizeOf_SYMBOL_TYPE',
'V8.SizeOf_TYPE_FEEDBACK_INFO_TYPE',
- 'V8.SizeOf_TYPE_SWITCH_INFO_TYPE'
- ]
+ 'V8.SizeOf_TYPE_SWITCH_INFO_TYPE',
+]
+
+# Descriptions for what different counter names represent.
+DESCRIPTIONS = {
+ 'V8.MemoryExternalFragmentationTotal':
+ 'Total external memory fragmentation after each GC in percent.',
+ 'V8.MemoryHeapSampleTotalCommitted':
+ 'The total size of committed memory used by V8 after each GC in KB.',
+ 'V8.MemoryHeapSampleTotalUsed':
+ 'The total size of live memory used by V8 after each GC in KB.',
+}
+
class V8ObjectStatsMetric(Metric):
"""V8ObjectStatsMetric gathers statistics on the size of types in the V8 heap.
@@ -184,21 +195,22 @@ class V8ObjectStatsMetric(Metric):
def GetV8StatsTable(tab, counters):
return tab.EvaluateJavaScript("""
- (function(counters) {
- var results = {};
- if (!window.chrome || !window.chrome.benchmarking)
- return results;
- try {
- window.gc(); // Trigger GC to ensure stats are checkpointed.
- } catch(e) {
- // window.gc() could have been mapped to something else, just continue.
- }
- for (var i = 0; i < counters.length; i++)
- results[counters[i]] =
- chrome.benchmarking.counterForRenderer(counters[i]);
- return results;
- })(%s);
- """ % json.dumps(counters))
+ (function(counters) {
+ var results = {};
+ if (!window.chrome || !window.chrome.benchmarking)
+ return results;
+ try {
+ window.gc(); // Trigger GC to ensure stats are checkpointed.
+ } catch(e) {
+ // window.gc() could have been mapped to something else,
+ // just continue.
+ }
+ for (var i = 0; i < counters.length; i++)
+ results[counters[i]] =
+ chrome.benchmarking.counterForRenderer(counters[i]);
+ return results;
+ })(%s);
+ """ % json.dumps(counters))
def Start(self, page, tab):
"""Do Nothing."""
@@ -214,7 +226,8 @@ class V8ObjectStatsMetric(Metric):
"""Add results for this page to the results object."""
assert self._results != None, 'Must call Stop() first'
for counter_name in self._results:
+ description = DESCRIPTIONS.get(counter_name)
display_name = counter_name.replace('.', '_')
results.AddValue(scalar.ScalarValue(
results.current_page, display_name, 'kb',
- self._results[counter_name] / 1024.0))
+ self._results[counter_name] / 1024.0, description=description))
« no previous file with comments | « tools/perf/metrics/memory.py ('k') | tools/perf/trace-info.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698