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

Side by Side Diff: tools/telemetry/telemetry/timeline/tracing_config.py

Issue 1338423007: [Telemetry] Platform-level tracing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review fix 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
« no previous file with comments | « tools/telemetry/telemetry/internal/platform/tracing_controller_backend.py ('k') | 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 2015 The Chromium Authors. All rights reserved. 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 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 import json 5 import json
6 6
7 7
8 class TracingConfig(object): 8 class TracingConfig(object):
9 """Tracing config is the configuration for Chrome tracing. 9 """Tracing config is the configuration for Chrome tracing.
10 10
11 This produces the trace config JSON string for Chrome tracing. For the details 11 This produces the trace config JSON string for Chrome tracing. For the details
12 about the JSON string format, see base/trace_event/trace_config.h. 12 about the JSON string format, see base/trace_event/trace_config.h.
13 """ 13 """
14 def __init__(self, tracing_options, tracing_category_filter): 14 def __init__(self, tracing_options, tracing_category_filter):
15 self._tracing_options = tracing_options 15 self._tracing_options = tracing_options
16 self._tracing_category_filter = tracing_category_filter 16 self._tracing_category_filter = tracing_category_filter
17 17
18 @property
19 def tracing_options(self):
20 return self._tracing_options
21
22 @property
23 def tracing_category_filter(self):
24 return self._tracing_category_filter
25
18 def GetTraceConfigJsonString(self): 26 def GetTraceConfigJsonString(self):
19 result = {} 27 result = {}
20 result.update(self._tracing_options.GetDictForChromeTracing()) 28 result.update(self._tracing_options.GetDictForChromeTracing())
21 result.update(self._tracing_category_filter.GetDictForChromeTracing()) 29 result.update(self._tracing_category_filter.GetDictForChromeTracing())
22 return json.dumps(result, sort_keys=True) 30 return json.dumps(result, sort_keys=True)
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/internal/platform/tracing_controller_backend.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698