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

Unified Diff: tools/telemetry/telemetry/web_perf/metrics/fast_metric.py

Issue 395893002: Convert results.Add to results.AddValue for files in web_perf/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix styling nit 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 | tools/telemetry/telemetry/web_perf/metrics/responsiveness_metric.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/web_perf/metrics/fast_metric.py
diff --git a/tools/telemetry/telemetry/web_perf/metrics/fast_metric.py b/tools/telemetry/telemetry/web_perf/metrics/fast_metric.py
index 8c75af17fcc158144a40c55f8a09461ed7be5e24..9ef76c08be6fce427aa3fe23887bf971a04c2fef 100644
--- a/tools/telemetry/telemetry/web_perf/metrics/fast_metric.py
+++ b/tools/telemetry/telemetry/web_perf/metrics/fast_metric.py
@@ -5,6 +5,7 @@
import logging
from telemetry.timeline import bounds
+from telemetry.value import scalar
from telemetry.web_perf import timeline_interaction_record as tir_module
from telemetry.web_perf.metrics import timeline_based_metric
@@ -31,7 +32,8 @@ class FastMetric(timeline_based_metric.TimelineBasedMetric):
self.VerifyNonOverlappedRecords(interaction_records)
duration = sum(r.end - r.start for r in interaction_records)
- results.Add('fast-duration', 'ms', duration)
+ results.AddValue(scalar.ScalarValue(
+ results.current_page, 'fast-duration', 'ms', duration))
try:
cpu_time = sum(
@@ -44,10 +46,12 @@ class FastMetric(timeline_based_metric.TimelineBasedMetric):
'trace does not contain thread time data.',
repr(interaction_records))
else:
- results.Add('fast-cpu_time', 'ms', cpu_time)
+ results.AddValue(scalar.ScalarValue(
+ results.current_page, 'fast-cpu_time', 'ms', cpu_time))
idle_time = duration - sum(
bounds.Bounds.GetOverlap(r.start, r.end, s.start, s.end)
for r in interaction_records
for s in renderer_thread.toplevel_slices)
- results.Add('fast-idle_time', 'ms', idle_time)
+ results.AddValue(scalar.ScalarValue(
+ results.current_page, 'fast-idle_time', 'ms', idle_time))
« no previous file with comments | « no previous file | tools/telemetry/telemetry/web_perf/metrics/responsiveness_metric.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698