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

Unified Diff: systrace/systrace/tracing_agents/__init__.py

Issue 2276263003: Pass in custom options to Systrace agents (Closed) Base URL: https://chromium.googlesource.com/external/github.com/catapult-project/catapult.git@master
Patch Set: Created 4 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
Index: systrace/systrace/tracing_agents/__init__.py
diff --git a/systrace/systrace/tracing_agents/__init__.py b/systrace/systrace/tracing_agents/__init__.py
index c99428c1de6c3d063d7168dc8731305a02f96104..f18d4f33a49dec82ca1ac5b1a010fc1702d8e28a 100644
--- a/systrace/systrace/tracing_agents/__init__.py
+++ b/systrace/systrace/tracing_agents/__init__.py
@@ -16,17 +16,25 @@ START_STOP_TIMEOUT = 10.0
GET_RESULTS_TIMEOUT = 30.0
+class TracingConfig(object):
+ '''Store the tracing configuration options for all Systrace agents. If there
+ are ever any options that are to be shared between all of the agents, those
+ options should go here.
+ '''
+ def __init__(self):
+ pass
+
class TracingAgent(object):
def __init__(self):
pass
- def StartAgentTracing(self, options, categories, timeout=None):
+ def StartAgentTracing(self, config, timeout=None):
'''Starts running the trace for this agent. Stops with timeout if
not completed within timeout interval.
Args:
- options: Tracing options.
- categories: Categories of trace events to record.
+ config: TracingOptions subclass containing agent-specific options
Sami 2016/08/26 15:53:43 s/TracingOptions/TracingConfig/?
washingtonp 2016/08/26 18:50:54 Done.
+ and categories.
timeout: Timeout interval in seconds.
Returns:

Powered by Google App Engine
This is Rietveld 408576698