Chromium Code Reviews| 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 message_loop_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.CreateMinimalOverheadFilter() | |
| 19 cat_filter.AddIncludedCategory('*') | |
|
eakuefner
2015/10/30 00:14:55
Can we maybe expand this to first add blink.consol
nednguyen
2015/10/30 16:29:56
Good call
| |
| 20 options = timeline_based_measurement.Options(overhead_level=cat_filter) | |
| 21 options.SetTimelineBasedMetrics( | |
| 22 [message_loop_metric.MessageLoopLatencyMetric()]) | |
| 23 return options | |
| 24 | |
| 25 @classmethod | |
| 26 def Name(cls): | |
| 27 return 'message_loop_counter.simple_story' | |
| OLD | NEW |