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

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

Issue 385213002: Update system_memory 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 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/system_memory.py
diff --git a/tools/perf/metrics/system_memory.py b/tools/perf/metrics/system_memory.py
index d998b8ba56d2fc774c71022bc11a0097ce1b2de9..6909d16a4f73efe8791fb219b7bf525ccc49ea43 100644
--- a/tools/perf/metrics/system_memory.py
+++ b/tools/perf/metrics/system_memory.py
@@ -4,6 +4,8 @@
from metrics import memory
from metrics import Metric
+from telemetry.value import scalar
+
class SystemMemoryMetric(Metric):
"""SystemMemoryMetric gathers system memory statistic.
@@ -59,16 +61,16 @@ class SystemMemoryMetric(Metric):
exclude_metrics=exclude_metrics)
if 'SystemCommitCharge' not in exclude_metrics:
- results.Add(trace_name or 'commit_charge', 'kb',
- memory_stats['SystemCommitCharge'],
- chart_name='commit_charge_delta',
- data_type='unimportant')
+ results.AddValue(scalar.ScalarValue(
+ results.current_page,
+ 'commit_charge_delta.%s' % (trace_name or 'commit_charge'), 'kb',
+ memory_stats['SystemCommitCharge'], important=False))
if 'ProcessCount' not in exclude_metrics:
- results.Add(trace_name or 'processes', 'count',
- memory_stats['ProcessCount'],
- chart_name='processes_delta',
- data_type='unimportant')
+ results.AddValue(scalar.ScalarValue(
+ results.current_page,
+ 'processes_delta.%s' % (trace_name or 'processes'), 'count',
+ memory_stats['ProcessCount'], important=False))
def _SubtractMemoryStats(end_memory_stats, start_memory_stats):
« 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