OLD | NEW |
| (Empty) |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 from telemetry import benchmark | |
5 from telemetry.timeline import tracing_category_filter | |
6 from telemetry.web_perf import timeline_based_measurement | |
7 | |
8 from benchmarks import simple_story_set | |
9 from benchmarks import v8_metric | |
10 | |
11 | |
12 class MessageLoopBenchmark(benchmark.Benchmark): | |
13 | |
14 def CreateStorySet(self, options): | |
15 return simple_story_set.SimpleStorySet() | |
16 | |
17 def CreateTimelineBasedMeasurementOptions(self): | |
18 cat_filter = tracing_category_filter.CreateNoOverheadFilter() | |
19 # blink.console category is required to make sure that Chrome can output | |
20 # interaction records in its tracing data. | |
21 cat_filter.AddIncludedCategory('blink.console') | |
22 cat_filter.AddIncludedCategory('v8') | |
23 options = timeline_based_measurement.Options(overhead_level=cat_filter) | |
24 options.SetTimelineBasedMetrics( | |
25 [v8_metric.MessageLoopLatencyMetric()]) | |
26 return options | |
27 | |
28 @classmethod | |
29 def Name(cls): | |
30 return 'v8_latency.simple_story' | |
OLD | NEW |