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

Unified Diff: tools/telemetry/telemetry/value/string.py

Issue 545523002: [Telemetry] Add capability for values to reference external files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Better approach + more tests Created 6 years, 3 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/value/string.py
diff --git a/tools/telemetry/telemetry/value/string.py b/tools/telemetry/telemetry/value/string.py
index b1cb6ff45eda72cd47b7d460e9b4d089e5c31b24..849db6ae25c25374ed7613871c148752387a47d6 100644
--- a/tools/telemetry/telemetry/value/string.py
+++ b/tools/telemetry/telemetry/value/string.py
@@ -9,14 +9,15 @@ from telemetry.value import none_values
class StringValue(value_module.Value):
def __init__(self, page, name, units, value, important=True,
- description=None, none_value_reason=None):
+ description=None, none_value_reason=None, paths=None):
"""A single value (float, integer or string) result from a test.
A test that output a hash of the content in a page might produce a
string value:
StringValue(page, 'page_hash', 'hash', '74E377FF')
"""
- super(StringValue, self).__init__(page, name, units, important, description)
+ super(StringValue, self).__init__(page, name, units, important, description,
+ paths)
assert value is None or isinstance(value, basestring)
none_values.ValidateNoneValueReason(value, none_value_reason)
self.value = value
@@ -27,13 +28,15 @@ class StringValue(value_module.Value):
page_name = self.page.url
else:
page_name = None
- return 'StringValue(%s, %s, %s, %s, important=%s, description=%s)' % (
+ return ('StringValue(%s, %s, %s, %s, important=%s, description=%s, '
+ 'paths=%s)') % (
page_name,
self.name,
self.units,
self.value,
self.important,
- self.description)
+ self.description,
+ self.paths)
def GetBuildbotDataType(self, output_context):
if self._IsImportantGivenOutputIntent(output_context):

Powered by Google App Engine
This is Rietveld 408576698