| Index: tools/telemetry/telemetry/value/skip.py
|
| diff --git a/tools/telemetry/telemetry/value/skip.py b/tools/telemetry/telemetry/value/skip.py
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a44e50893c2f9ab77518b78231c0bd5c6d6d7b8d
|
| --- /dev/null
|
| +++ b/tools/telemetry/telemetry/value/skip.py
|
| @@ -0,0 +1,58 @@
|
| +# Copyright 2014 The Chromium Authors. All rights reserved.
|
| +# Use of this source code is governed by a BSD-style license that can be
|
| +# found in the LICENSE file.
|
| +
|
| +from telemetry import value as value_module
|
| +
|
| +class SkipValue(value_module.Value):
|
| +
|
| + def __init__(self, page, reason):
|
| + """A value representing a skipped page.
|
| +
|
| + Args:
|
| + page: The skipped page object.
|
| + reason: The string reason the page was skipped.
|
| + """
|
| + super(SkipValue, self).__init__(page, 'skip', '', True)
|
| + self._reason = reason
|
| +
|
| + def __repr__(self):
|
| + page_name = self.page.url
|
| + return 'SkipValue(%s, %s)' % (page_name, self._reason)
|
| +
|
| + @property
|
| + def reason(self):
|
| + return self._reason
|
| +
|
| + def GetBuildbotDataType(self, output_context):
|
| + return None
|
| +
|
| + def GetBuildbotValue(self):
|
| + return None
|
| +
|
| + def GetBuildbotMeasurementAndTraceNameForPerPageResult(self):
|
| + return None
|
| +
|
| + def GetRepresentativeNumber(self):
|
| + return None
|
| +
|
| + def GetRepresentativeString(self):
|
| + return None
|
| +
|
| + @classmethod
|
| + def GetJSONTypeName(cls):
|
| + return 'skip'
|
| +
|
| + def AsDict(self):
|
| + d = super(SkipValue, self).AsDict()
|
| + d['reason'] = self._reason
|
| + return d
|
| +
|
| + @classmethod
|
| + def MergeLikeValuesFromSamePage(cls, values):
|
| + assert False, 'Should not be called.'
|
| +
|
| + @classmethod
|
| + def MergeLikeValuesFromDifferentPages(cls, values,
|
| + group_by_name_suffix=False):
|
| + assert False, 'Should not be called.'
|
|
|