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

Unified Diff: tools/telemetry/telemetry/web_perf/metrics/layout.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: Fix linter issues Created 5 years, 11 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
Index: tools/telemetry/telemetry/web_perf/metrics/layout.py
diff --git a/tools/telemetry/telemetry/web_perf/metrics/layout.py b/tools/telemetry/telemetry/web_perf/metrics/layout.py
index baa5295a7aa2a35b73531b03dd292c87b8b76074..fe2bd990285dfbead99fe96b76ff750237b37766 100644
--- a/tools/telemetry/telemetry/web_perf/metrics/layout.py
+++ b/tools/telemetry/telemetry/web_perf/metrics/layout.py
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import math
+from telemetry.value import improvement_direction
from telemetry.value import scalar
from telemetry.web_perf.metrics import timeline_based_metric
@@ -51,7 +52,9 @@ class LayoutMetric(timeline_based_metric.TimelineBasedMetric):
stddev = math.sqrt(sum((d - avg) ** 2 for d in durations) / count)
results.AddValue(scalar.ScalarValue(results.current_page,
short_name + '_avg', 'ms', avg,
- description='Average duration of %s events' % long_name))
+ description='Average duration of %s events' % long_name,
+ improvement_direction=improvement_direction.DOWN))
results.AddValue(scalar.ScalarValue(results.current_page,
short_name + '_stddev', 'ms', stddev,
- description='stddev of duration of %s events' % long_name))
+ description='stddev of duration of %s events' % long_name,
+ improvement_direction=improvement_direction.DOWN))

Powered by Google App Engine
This is Rietveld 408576698