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

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

Issue 809393002: Added support for improvement_direction to relevant values, which is propogated to chartjson. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
Index: tools/perf/metrics/memory.py
diff --git a/tools/perf/metrics/memory.py b/tools/perf/metrics/memory.py
index 70b2ccff928fe81306e7339efcddc720ade139c2..22d5301514d78d86d06e648de93ad9f22975e177 100644
--- a/tools/perf/metrics/memory.py
+++ b/tools/perf/metrics/memory.py
@@ -17,13 +17,15 @@ _HISTOGRAMS = [
'type': histogram_util.RENDERER_HISTOGRAM,
'description': 'Total external memory fragmentation after each GC in '
'percent.',
+ 'higher_is_better': False,
},
{
'name': 'V8.MemoryHeapSampleTotalCommitted', 'units': 'kb',
'display_name': 'V8_MemoryHeapSampleTotalCommitted',
'type': histogram_util.RENDERER_HISTOGRAM,
'description': 'The total size of committed memory used by V8 after '
- 'each GC in KB.'
+ 'each GC in KB.',
+ 'higher_is_better': False,
},
{
'name': 'V8.MemoryHeapSampleTotalUsed', 'units': 'kb',
@@ -31,21 +33,25 @@ _HISTOGRAMS = [
'type': histogram_util.RENDERER_HISTOGRAM,
'description': 'The total size of live memory used by V8 after each '
'GC in KB.',
+ 'higher_is_better': False,
},
{
'name': 'V8.MemoryHeapSampleMaximumCommitted', 'units': 'kb',
'display_name': 'V8_MemoryHeapSampleMaximumCommitted',
- 'type': histogram_util.RENDERER_HISTOGRAM
+ 'type': histogram_util.RENDERER_HISTOGRAM,
+ 'higher_is_better': False,
},
{
'name': 'Memory.RendererUsed', 'units': 'kb',
'display_name': 'Memory_RendererUsed',
- 'type': histogram_util.RENDERER_HISTOGRAM
+ 'type': histogram_util.RENDERER_HISTOGRAM,
+ 'higher_is_better': False,
},
{
'name': 'Memory.BrowserUsed', 'units': 'kb',
'display_name': 'Memory_BrowserUsed',
- 'type': histogram_util.BROWSER_HISTOGRAM
+ 'type': histogram_util.BROWSER_HISTOGRAM,
+ 'higher_is_better': False,
},
]
@@ -121,7 +127,8 @@ class MemoryMetric(Metric):
results.AddValue(histogram.HistogramValue(
results.current_page, h['display_name'], h['units'],
raw_value_json=self._histogram_delta[h['name']], important=False,
- description=h.get('description')))
+ description=h.get('description'),
+ higher_is_better=h.get('higher_is_better')))
self._memory_stats = self._browser.memory_stats
if not self._memory_stats['Browser']:
return
@@ -135,11 +142,13 @@ class MemoryMetric(Metric):
results.current_page,
'commit_charge.' + (trace_name or 'commit_charge'),
'kb', commit_charge_difference, important=False,
- description='System commit charge (committed memory pages).'))
+ description='System commit charge (committed memory pages).',
+ higher_is_better=False))
results.AddValue(scalar.ScalarValue(
results.current_page, 'processes.' + (trace_name or 'processes'),
'count', self._memory_stats['ProcessCount'], important=False,
- description='Number of processes used by Chrome.'))
+ description='Number of processes used by Chrome.',
+ higher_is_better=False))
def AddResultsForProcesses(results, memory_stats, chart_trace_name='final',
@@ -193,7 +202,8 @@ def AddResultsForProcesses(results, memory_stats, chart_trace_name='final',
chart_name = current_trace
results.AddValue(scalar.ScalarValue(
results.current_page, '%s.%s' % (chart_name, current_trace), 'kb',
- sum(values) / 1024, important=False, description=description))
+ sum(values) / 1024, important=False, description=description,
+ higher_is_better=False))
AddResult('VM', 'vm_%s_size' % chart_trace_name,
'Virtual Memory Size (address space allocated).')

Powered by Google App Engine
This is Rietveld 408576698