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/telemetry/telemetry/web_perf/metrics/blob_timeline.py

Issue 1313243003: [Telemetry] Introduce SummarizableValue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 4 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/blob_timeline.py
diff --git a/tools/telemetry/telemetry/web_perf/metrics/blob_timeline.py b/tools/telemetry/telemetry/web_perf/metrics/blob_timeline.py
index 684973c85c2a82a557958d09d98dff8e01f009f2..26d06347c9412958e654cc91df7a7da3fb1c8b54 100644
--- a/tools/telemetry/telemetry/web_perf/metrics/blob_timeline.py
+++ b/tools/telemetry/telemetry/web_perf/metrics/blob_timeline.py
@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+from telemetry.value import improvement_direction
from telemetry.value import list_of_scalar_values
from telemetry.web_perf.metrics import timeline_based_metric
@@ -65,18 +66,20 @@ class BlobTimelineMetric(timeline_based_metric.TimelineBasedMetric):
writes.append(self.ThreadDurationIfPresent(event))
if writes:
results.AddValue(list_of_scalar_values.ListOfScalarValues(
- page=results.current_page,
- name='blob-writes',
- units='ms',
- values=writes,
- description='List of durations of blob writes.'))
+ page=results.current_page,
+ name='blob-writes',
+ units='ms',
+ values=writes,
+ description='List of durations of blob writes.',
+ improvement_direction=improvement_direction.DOWN))
else:
results.AddValue(list_of_scalar_values.ListOfScalarValues(
- page=results.current_page,
- name='blob-writes',
- units='ms',
- values=None,
- none_value_reason='No blob write events found for this interaction.'))
+ page=results.current_page,
+ name='blob-writes',
+ units='ms',
+ values=None,
+ none_value_reason='No blob write events found for this interaction.',
+ improvement_direction=improvement_direction.DOWN))
def _AddReadResultsInternal(self, events, interactions, results):
@@ -95,15 +98,17 @@ class BlobTimelineMetric(timeline_based_metric.TimelineBasedMetric):
if reads:
results.AddValue(list_of_scalar_values.ListOfScalarValues(
- page=results.current_page,
- name='blob-reads',
- units='ms',
- values=reads.values(),
- description='List of read times for blobs.'))
+ page=results.current_page,
+ name='blob-reads',
+ units='ms',
+ values=reads.values(),
+ description='List of read times for blobs.',
+ improvement_direction=improvement_direction.DOWN))
else:
results.AddValue(list_of_scalar_values.ListOfScalarValues(
- page=results.current_page,
- name='blob-reads',
- units='ms',
- values=None,
- none_value_reason='No blob read events found for this interaction.'))
+ page=results.current_page,
+ name='blob-reads',
+ units='ms',
+ values=None,
+ none_value_reason='No blob read events found for this interaction.',
+ improvement_direction=improvement_direction.DOWN))
« no previous file with comments | « tools/telemetry/telemetry/value/summary_unittest.py ('k') | tools/telemetry/telemetry/web_perf/metrics/gpu_timeline.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698