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

Side by Side Diff: tools/telemetry/telemetry/core/platform/tracing_controller.py

Issue 414253004: Introduce TracingController and TracingControllerBackend skeleton (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 # Copyright 2014 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
5 class TracingController(object):
6 def __init__(self, tracing_controller_backend):
7 """Provides control of the tracing systems supported by telemetry."""
8 self._tracing_controller_backend = tracing_controller_backend
9
10 def Start(self, category_filter, trace_options, timeout=10):
11 """Starts tracing.
12
13 trace_options specifies which tracing systems to activate. Category filter
14 allows fine-tuning of the data that are collected by the selected tracing
15 systems.
16 """
nednguyen 2014/08/04 22:12:06 Should we add assert self.AreOptionsSupported(trac
17 self._tracing_controller_backend.Start(
18 category_filter, trace_options, timeout)
19
20 def Stop(self):
21 """Stops tracing and returns a TraceValue."""
22 return self._tracing_controller_backend.Stop()
23
24 @property
25 def is_tracing_running(self):
26 return self._tracing_controller_backend.is_tracing_running
27
28 def AreOptionsSupported(self, trace_options):
29 """Returns whether the tracers requested by trace_options are supported.
30
31 If the browser is not running at the time that this query is issued, then
32 no answer can be provided.
33 """
34 return self._tracing_controller_backend.AreOptionsSupported(trace_options)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698