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

Unified Diff: tools/telemetry/telemetry/core/platform/tracing_options.py

Issue 453033002: Switch startTracing to use record-as-much-as-possible option. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Nat's comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/telemetry/telemetry/core/platform/tracing_controller_backend.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/platform/tracing_options.py
diff --git a/tools/telemetry/telemetry/core/platform/tracing_options.py b/tools/telemetry/telemetry/core/platform/tracing_options.py
index f2d747718bde5da4bc8264fad26e9cb05007642c..336ea3523f1b992683f11d50419dd05bd7e67924 100644
--- a/tools/telemetry/telemetry/core/platform/tracing_options.py
+++ b/tools/telemetry/telemetry/core/platform/tracing_options.py
@@ -2,12 +2,35 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+RECORD_AS_MUCH_AS_POSSIBLE = 'record-as-much-as-possible'
+RECORD_UNTIL_FULL = 'record-until-full'
+RECORD_MODES = (RECORD_AS_MUCH_AS_POSSIBLE, RECORD_UNTIL_FULL)
+
+
class TracingOptions(object):
"""Tracing options control which core tracing systems should be enabled.
This simply turns on those systems. If those systems have additional options,
e.g. what to trace, then they are typically configured by adding
categories to the TracingCategoryFilter.
+
+ Options:
+ enable_chrome_trace: a boolean that specifies whether to enable
+ chrome tracing.
+ record_mode: can be any mode in RECORD_MODES. This corresponds to
+ record modes in chrome (see
+ TraceRecordMode in base/debug/trace_event_impl.h for more
+ information)
"""
def __init__(self):
- self.enable_chrome_trace = False
+ self.enable_chrome_trace = False
+ self._record_mode = RECORD_AS_MUCH_AS_POSSIBLE
+
+ @property
+ def record_mode(self): # pylint: disable=E0202
+ return self._record_mode
+
+ @record_mode.setter
+ def record_mode(self, value): # pylint: disable=E0202
+ assert value in RECORD_MODES
+ self._record_mode = value
« no previous file with comments | « tools/telemetry/telemetry/core/platform/tracing_controller_backend.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698