OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 from telemetry import benchmark | 4 from telemetry import benchmark |
5 from telemetry.web_perf import timeline_based_measurement | 5 from telemetry.web_perf import timeline_based_measurement |
6 | 6 |
7 from benchmarks import simple_story_set | 7 from benchmarks import simple_story_set |
8 | 8 |
9 class TBMSample(benchmark.Benchmark): | 9 class TBMSample(benchmark.Benchmark): |
10 | 10 |
11 def CreateStorySet(self, options): | 11 def CreateStorySet(self, options): |
12 return simple_story_set.SimpleStorySet() | 12 return simple_story_set.SimpleStorySet() |
13 | 13 |
14 def CreateTimelineBasedMeasurementOptions(self): | 14 def CreateTimelineBasedMeasurementOptions(self): |
15 options = timeline_based_measurement.Options() | 15 options = timeline_based_measurement.Options() |
16 options.SetTimelineBasedMetric('sample_metric.html') | 16 options.SetTimelineBasedMetrics(['sample_metric.html']) |
17 return options | 17 return options |
18 | 18 |
19 @classmethod | 19 @classmethod |
20 def Name(cls): | 20 def Name(cls): |
21 return 'tbm_sample.tbm_sample' | 21 return 'tbm_sample.tbm_sample' |
OLD | NEW |