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

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: Rebase 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
« no previous file with comments | « systrace/systrace/systrace_runner.py ('k') | systrace/systrace/tracing_agents/atrace_agent.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..859d7795c1ea97d075737816db9824d88eb97e10 100644
--- a/systrace/systrace/tracing_agents/__init__.py
+++ b/systrace/systrace/tracing_agents/__init__.py
@@ -16,17 +16,26 @@ 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: TracingConfig subclass containing agent-specific options
+ and categories.
timeout: Timeout interval in seconds.
Returns:
« no previous file with comments | « systrace/systrace/systrace_runner.py ('k') | systrace/systrace/tracing_agents/atrace_agent.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698