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

Unified Diff: tools/telemetry/telemetry/value/histogram.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: Created 6 years 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/value/histogram.py
diff --git a/tools/telemetry/telemetry/value/histogram.py b/tools/telemetry/telemetry/value/histogram.py
index 64fadb0a833773175cee0e62f059748200f16bef..d0eaaa36c1f74705849856c6af27d02b20bd36ac 100644
--- a/tools/telemetry/telemetry/value/histogram.py
+++ b/tools/telemetry/telemetry/value/histogram.py
@@ -29,9 +29,9 @@ class HistogramValueBucket(object):
class HistogramValue(value_module.Value):
def __init__(self, page, name, units,
raw_value=None, raw_value_json=None, important=True,
- description=None):
+ description=None, higher_is_better=None):
super(HistogramValue, self).__init__(page, name, units, important,
- description)
+ description, higher_is_better)
if raw_value_json:
assert raw_value == None, \
'Don\'t specify both raw_value and raw_value_json'
@@ -54,12 +54,13 @@ class HistogramValue(value_module.Value):
else:
page_name = None
return ('HistogramValue(%s, %s, %s, raw_json_string="%s", '
- 'important=%s, description=%s') % (
+ 'important=%s, description=%s, higher_is_better=%s') % (
page_name,
self.name, self.units,
self.ToJSONString(),
self.important,
- self.description)
+ self.description,
+ self.higher_is_better)
def GetBuildbotDataType(self, output_context):
if self._IsImportantGivenOutputIntent(output_context):
@@ -115,7 +116,7 @@ class HistogramValue(value_module.Value):
v0.page, v0.name, v0.units,
raw_value_json=histogram_util.AddHistograms(
[v.ToJSONString() for v in values]),
- important=v0.important)
+ important=v0.important, higher_is_better=v0.higher_is_better)
@classmethod
def MergeLikeValuesFromDifferentPages(cls, values,

Powered by Google App Engine
This is Rietveld 408576698