OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import json | 5 import json |
6 | 6 |
7 from telemetry.internal.results import output_formatter | 7 from telemetry.internal.results import output_formatter |
8 | 8 |
9 | 9 |
10 def ResultsAsDict(page_test_results, benchmark_metadata): | 10 def ResultsAsDict(page_test_results, benchmark_metadata): |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 50 |
51 @property | 51 @property |
52 def benchmark_metadata(self): | 52 def benchmark_metadata(self): |
53 return self._benchmark_metadata | 53 return self._benchmark_metadata |
54 | 54 |
55 def Format(self, page_test_results): | 55 def Format(self, page_test_results): |
56 json.dump( | 56 json.dump( |
57 ResultsAsDict(page_test_results, self.benchmark_metadata), | 57 ResultsAsDict(page_test_results, self.benchmark_metadata), |
58 self.output_stream, indent=2) | 58 self.output_stream, indent=2) |
59 self.output_stream.write('\n') | 59 self.output_stream.write('\n') |
| 60 |
| 61 def FormatDisabled(self): |
| 62 pass |
OLD | NEW |