Chromium Code Reviews| Index: tools/telemetry/examples/benchmarks/message_loop_benchmark.py |
| diff --git a/tools/telemetry/examples/benchmarks/message_loop_benchmark.py b/tools/telemetry/examples/benchmarks/message_loop_benchmark.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0f63be31fca6063fd9ccc287a42b024a2b57c156 |
| --- /dev/null |
| +++ b/tools/telemetry/examples/benchmarks/message_loop_benchmark.py |
| @@ -0,0 +1,27 @@ |
| +# Copyright 2015 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| +from telemetry import benchmark |
| +from telemetry.timeline import tracing_category_filter |
| +from telemetry.web_perf import timeline_based_measurement |
| + |
| +from benchmarks import simple_story_set |
| +from benchmarks import message_loop_metric |
| + |
| + |
| +class MessageLoopBenchmark(benchmark.Benchmark): |
| + |
| + def CreateStorySet(self, options): |
| + return simple_story_set.SimpleStorySet() |
| + |
| + def CreateTimelineBasedMeasurementOptions(self): |
| + cat_filter = tracing_category_filter.CreateMinimalOverheadFilter() |
| + 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
|
| + options = timeline_based_measurement.Options(overhead_level=cat_filter) |
| + options.SetTimelineBasedMetrics( |
| + [message_loop_metric.MessageLoopLatencyMetric()]) |
| + return options |
| + |
| + @classmethod |
| + def Name(cls): |
| + return 'message_loop_counter.simple_story' |