Index: tools/telemetry/telemetry/value/__init__.py |
diff --git a/tools/telemetry/telemetry/value/__init__.py b/tools/telemetry/telemetry/value/__init__.py |
index 474a9b4e77536d64f5d34bf417c421a797424116..77324c5658e143ab94a19191cc8505bce3371f8d 100644 |
--- a/tools/telemetry/telemetry/value/__init__.py |
+++ b/tools/telemetry/telemetry/value/__init__.py |
@@ -43,7 +43,7 @@ class Value(object): |
"""An abstract value produced by a telemetry page test. |
""" |
def __init__(self, page, name, units, important, description, |
- interaction_record): |
+ tir_label): |
"""A generic Value object. |
Args: |
@@ -57,7 +57,7 @@ class Value(object): |
by default in downstream UIs. |
description: A string explaining in human-understandable terms what this |
value represents. |
- interaction_record: The string label of the TimelineInteractionRecord with |
+ tir_label: The string label of the TimelineInteractionRecord with |
which this value is associated. |
""" |
# TODO(eakuefner): Check user story here after migration (crbug.com/442036) |
@@ -69,9 +69,9 @@ class Value(object): |
raise ValueError('important field of Value must be bool.') |
if not ((description is None) or isinstance(description, basestring)): |
raise ValueError('description field of Value must absent or string.') |
- if not ((interaction_record is None) or |
- isinstance(interaction_record, basestring)): |
- raise ValueError('interaction_record field of Value must absent or ' |
+ if not ((tir_label is None) or |
+ isinstance(tir_label, basestring)): |
+ raise ValueError('tir_label field of Value must absent or ' |
'string.') |
self.page = page |
@@ -79,13 +79,13 @@ class Value(object): |
self.units = units |
self.important = important |
self.description = description |
- self.interaction_record = interaction_record |
+ self.tir_label = tir_label |
def IsMergableWith(self, that): |
return (self.units == that.units and |
type(self) == type(that) and |
self.important == that.important and |
- self.interaction_record == that.interaction_record) |
+ self.tir_label == that.tir_label) |
@classmethod |
def MergeLikeValuesFromSamePage(cls, values): |
@@ -205,8 +205,8 @@ class Value(object): |
if self.description: |
d['description'] = self.description |
- if self.interaction_record: |
- d['interaction_record'] = self.interaction_record |
+ if self.tir_label: |
+ d['tir_label'] = self.tir_label |
if self.page: |
d['page_id'] = self.page.id |
@@ -294,11 +294,11 @@ class Value(object): |
d['important'] = False |
- interaction_record = value_dict.get('interaction_record', None) |
- if interaction_record: |
- d['interaction_record'] = interaction_record |
+ tir_label = value_dict.get('tir_label', None) |
+ if tir_label: |
+ d['tir_label'] = tir_label |
else: |
- d['interaction_record'] = None |
+ d['tir_label'] = None |
return d |