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

Side by Side Diff: tools/perf/benchmarks/tracing.py

Issue 2052753002: [telemetry] Add new tracing benchmark for background mode memory-infra (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@browsertest_background
Patch Set: new benchmark. Created 4 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 4
5 from core import perf_benchmark 5 from core import perf_benchmark
6 6
7 from telemetry import benchmark
8 from telemetry.timeline import tracing_category_filter
9 from telemetry.timeline import tracing_config
7 from telemetry.web_perf import timeline_based_measurement 10 from telemetry.web_perf import timeline_based_measurement
8 11
9 import page_sets 12 import page_sets
10 13
11 14
12 class TracingWithDebugOverhead(perf_benchmark.PerfBenchmark): 15 class TracingWithDebugOverhead(perf_benchmark.PerfBenchmark):
13 16
14 page_set = page_sets.Top10PageSet 17 page_set = page_sets.Top10PageSet
15 18
16 def CreateTimelineBasedMeasurementOptions(self): 19 def CreateTimelineBasedMeasurementOptions(self):
17 options = timeline_based_measurement.Options( 20 options = timeline_based_measurement.Options(
18 timeline_based_measurement.DEBUG_OVERHEAD_LEVEL) 21 timeline_based_measurement.DEBUG_OVERHEAD_LEVEL)
19 options.SetTimelineBasedMetric('tracingMetric') 22 options.SetTimelineBasedMetric('tracingMetric')
20 return options 23 return options
21 24
22 @classmethod 25 @classmethod
23 def Name(cls): 26 def Name(cls):
24 return 'tracing.tracing_with_debug_overhead' 27 return 'tracing.tracing_with_debug_overhead'
28
29
30 # Enable on reference builds once stable browser starts supporting background
Zhen Wang 2016/06/17 19:45:22 Can you add it as TODO here?
ssid 2016/06/17 21:02:46 Done.
31 # mode memory-infra (after branch 2760).
32 @benchmark.Disabled('reference')
33 class TracingWithBackgroundMemoryInfra(perf_benchmark.PerfBenchmark):
34 """Measures the timeline metrics for overhead of background memory-infra
Zhen Wang 2016/06/17 19:45:22 This should be one line. Then followed by detailed
ssid 2016/06/17 21:02:46 Done.
35 dumps"""
36 page_set = page_sets.Top10PageSet
37
38 def CreateTimelineBasedMeasurementOptions(self):
39 # Enable only memory-infra category with periodic background mode dumps
40 # every 200 milliseconds.
41 trace_memory = tracing_category_filter.TracingCategoryFilter(
42 filter_string='-*,blink.console,disabled-by-default-memory-infra')
Zhen Wang 2016/06/17 19:45:22 What does "-*" mean here?
ssid 2016/06/17 21:02:46 -* means it excludes all the default categories. T
43 options = timeline_based_measurement.Options(overhead_level=trace_memory)
44 memory_dump_config = tracing_config.MemoryDumpConfig()
45 memory_dump_config.AddTrigger('background', 200)
46 options.config.SetMemoryDumpConfig(memory_dump_config)
47 options.SetTimelineBasedMetric('tracingMetric')
48 return options
49
50 @classmethod
51 def Name(cls):
52 return 'tracing.tracing_with_background_memory_infra'
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698