Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Side by Side Diff: tools/telemetry/examples/benchmarks/message_loop_benchmark.py

Issue 1368533002: [Telemetry] Add an example for adding an end to end Telemetry benchmark (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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'
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698