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

Unified Diff: systrace/systrace/tracing_agents/atrace_from_file_agent.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
Index: systrace/systrace/tracing_agents/atrace_from_file_agent.py
diff --git a/systrace/systrace/tracing_agents/atrace_from_file_agent.py b/systrace/systrace/tracing_agents/atrace_from_file_agent.py
index ec2ab370f7faf0b17fa19b26b352ddae26f84641..76884d23d8e5ac74822b2ede707cd8a05e800a23 100644
--- a/systrace/systrace/tracing_agents/atrace_from_file_agent.py
+++ b/systrace/systrace/tracing_agents/atrace_from_file_agent.py
@@ -24,6 +24,22 @@ def try_create_agent(options):
else:
return False
+
+class AtraceFromFileConfig(tracing_agents.TracingConfig):
+ def __init__(self, fix_circular, from_file):
+ tracing_agents.TracingConfig.__init__(self)
+ self.fix_circular = fix_circular
+ self.from_file = from_file
+
+def add_options(parser): # pylint: disable=unused-argument
+ # The atrace_from_file_agent is not currently used, so don't display
+ # any options.
+ return None
+
+def get_config(options):
+ return AtraceFromFileConfig(options.fix_circular, options.from_file)
+
+
class AtraceFromFileAgent(tracing_agents.TracingAgent):
def __init__(self, options):
super(AtraceFromFileAgent, self).__init__()
@@ -32,7 +48,7 @@ class AtraceFromFileAgent(tracing_agents.TracingAgent):
self._fix_circular_traces = options.fix_circular
@py_utils.Timeout(tracing_agents.START_STOP_TIMEOUT)
- def StartAgentTracing(self, options, categories, timeout=None):
+ def StartAgentTracing(self, options, timeout=None):
pass
@py_utils.Timeout(tracing_agents.START_STOP_TIMEOUT)
« no previous file with comments | « systrace/systrace/tracing_agents/atrace_agent_unittest.py ('k') | systrace/systrace/tracing_agents/battor_trace_agent.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698