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

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

Issue 329723004: Change results.Add to results.AddResult in endure, media metrics and media benchmark. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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
« tools/perf/measurements/endure.py ('K') | « tools/perf/measurements/endure.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/metrics/media.py
diff --git a/tools/perf/metrics/media.py b/tools/perf/metrics/media.py
index ce2c8ba23d8b6c2db9a29c5e18640fa5887eae05..099813cdb217d6d5da47f0e8e7a3090d77cda1aa 100644
--- a/tools/perf/metrics/media.py
+++ b/tools/perf/metrics/media.py
@@ -4,6 +4,9 @@
import logging
import os
+from telemetry.value import scalar
+from telemetry.value import list_of_scalar_values
tonyg 2014/06/11 03:39:39 nit:alphabetize
+
from metrics import Metric
@@ -58,12 +61,16 @@ class MediaMetric(Metric):
for m in metrics:
if m.startswith(metric):
special_label = m[len(metric):]
+ trace_name = '%s.%s%s' % (metric, trace, special_label)
if isinstance(metrics[m], list):
- values = [float(v) for v in metrics[m]]
+ results.AddValue(list_of_scalar_values.ListOfScalarValues(
+ results.current_page, trace_name, unit,
+ values=[float(v) for v in metrics[m]],
+ important=True))
else:
- values = float(metrics[m])
- results.Add(trace + special_label, unit, values,
- chart_name=metric, data_type='default')
+ results.AddValue(scalar.ScalarValue(
+ results.current_page, trace_name, unit, value=float(metrics[m]),
+ important=True))
trace = media_metric['id']
if not trace:
« tools/perf/measurements/endure.py ('K') | « tools/perf/measurements/endure.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698