Chromium Code Reviews| Index: dashboard/dashboard/pinpoint/models/quest/read_value.py |
| diff --git a/dashboard/dashboard/pinpoint/models/quest/read_value.py b/dashboard/dashboard/pinpoint/models/quest/read_value.py |
| index 090ff45e2b1513ff4f5939b78b36c0d09cedff7d..e2ae829cbab0740ccdcc0c1b2bbd0211560dc34b 100644 |
| --- a/dashboard/dashboard/pinpoint/models/quest/read_value.py |
| +++ b/dashboard/dashboard/pinpoint/models/quest/read_value.py |
| @@ -42,11 +42,15 @@ class _ReadChartJsonValueExecution(execution.Execution): |
| super(_ReadChartJsonValueExecution, self).__init__() |
| self._chart = chart |
| self._tir_label = tir_label |
| - self._trace = trace or 'summary' |
| + self._trace = trace |
| self._isolate_hash = isolate_hash |
| + self._trace_url = None |
| + |
| def _AsDict(self): |
| - return {} |
| + if not self._trace_url: |
|
shatch
2017/09/27 11:55:50
Getting a failure here with no attribute _trace_ur
|
| + return {} |
| + return {'trace_url': self._trace_url} |
| def _Poll(self): |
| chartjson = _RetrieveOutputJson(self._isolate_hash, 'chartjson-output.json') |
| @@ -56,13 +60,13 @@ class _ReadChartJsonValueExecution(execution.Execution): |
| else: |
| chart_name = self._chart |
| if chart_name not in chartjson['charts']: |
| - raise ReadValueError('The chart "%s" is not in the results.' % |
| - chart_name) |
| - if self._trace not in chartjson['charts'][chart_name]: |
| - raise ReadValueError('The trace "%s" is not in the results.' % |
| - self._trace) |
| - chart = chartjson['charts'][chart_name][self._trace] |
| + raise ReadValueError('The chart "%s" is not in the results.' % chart_name) |
| + trace_name = self._trace or 'summary' |
| + if trace_name not in chartjson['charts'][chart_name]: |
| + raise ReadValueError('The trace "%s" is not in the results.' % trace_name) |
| + |
| + chart = chartjson['charts'][chart_name][trace_name] |
| if chart['type'] == 'list_of_scalar_values': |
| result_values = chart['values'] |
| elif chart['type'] == 'histogram': |
| @@ -70,6 +74,9 @@ class _ReadChartJsonValueExecution(execution.Execution): |
| elif chart['type'] == 'scalar': |
| result_values = [chart['value']] |
| + if self._trace: |
|
shatch
2017/09/27 11:55:50
The bug linked (technically the one duped and clos
perezju
2017/09/27 12:24:06
chartjson (I think) only keeps a link to one of th
|
| + self._trace_url = chartjson['charts']['trace'][self._trace]['cloud_url'] |
| + |
| self._Complete(result_values=tuple(result_values)) |