Index: tools/perf/metrics/memory.py |
=================================================================== |
--- tools/perf/metrics/memory.py (revision 222891) |
+++ tools/perf/metrics/memory.py (working copy) |
@@ -6,7 +6,12 @@ |
from metrics import histogram_util |
from metrics import Metric |
+from telemetry.core import util |
+# Get build scripts into our path. |
+util.AddDirToPythonPath(util.GetChromiumSrcDir(), 'build', 'util', 'lib') |
+from common import perf_result_data_type # pylint: disable=F0401 |
+ |
_HISTOGRAMS = [ |
{'name': 'V8.MemoryExternalFragmentationTotal', 'units': 'percent', |
'type': histogram_util.RENDERER_HISTOGRAM}, |
@@ -85,7 +90,7 @@ |
if h['name'] not in self._histogram_start: |
continue |
results.Add(h['name'], h['units'], self._histogram_delta[h['name']], |
- data_type='unimportant-histogram') |
+ data_type=perf_result_data_type.UNIMPORTANT_HISTOGRAM) |
def AddSummaryResults(self, results): |
"""Add summary (overall) results to the results object.""" |
@@ -119,8 +124,10 @@ |
if value_name_memory in stats: |
values.append(stats[value_name_memory]) |
if values: |
- results.AddSummary(value_name_trace + process_type_trace, |
- 'bytes', sum(values), data_type='unimportant') |
+ (results |
+ .AddSummary(value_name_trace + process_type_trace, |
+ 'bytes', sum(values), |
+ data_type=perf_result_data_type.UNIMPORTANT_HISTOGRAM) ) |
AddSummary('VM', 'vm_final_size_') |
AddSummary('WorkingSetSize', 'vm_%s_final_size_' % metric) |
@@ -137,7 +144,7 @@ |
end_commit_charge = self._memory_stats['SystemCommitCharge'] |
commit_charge_difference = end_commit_charge - self._start_commit_charge |
results.AddSummary('commit_charge', 'kb', commit_charge_difference, |
- data_type='unimportant') |
+ data_type=perf_result_data_type.UNIMPORTANT) |
results.AddSummary('processes', 'count', self._memory_stats['ProcessCount'], |
- data_type='unimportant') |
+ data_type=perf_result_data_type.UNIMPORTANT) |