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

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: Fix comment and todo. 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 # TODO(ssid): Enable on reference builds once stable browser starts supporting
31 # background mode memory-infra. crbug.com/621195.
32 @benchmark.Disabled('reference')
33 class TracingWithBackgroundMemoryInfra(perf_benchmark.PerfBenchmark):
34 """Measures the overhead of background memory-infra dumps"""
35 page_set = page_sets.Top10PageSet
36
37 def CreateTimelineBasedMeasurementOptions(self):
38 # Enable only memory-infra category with periodic background mode dumps
39 # every 200 milliseconds.
40 trace_memory = tracing_category_filter.TracingCategoryFilter(
41 filter_string='-*,blink.console,disabled-by-default-memory-infra')
42 options = timeline_based_measurement.Options(overhead_level=trace_memory)
43 memory_dump_config = tracing_config.MemoryDumpConfig()
44 memory_dump_config.AddTrigger('background', 200)
45 options.config.SetMemoryDumpConfig(memory_dump_config)
46 options.SetTimelineBasedMetric('tracingMetric')
47 return options
48
49 @classmethod
50 def Name(cls):
51 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