| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 # Copyright 2016 The Chromium Authors. All rights reserved. | 3 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 '''Tracing agent interface for systrace. | 7 '''Tracing agent interface for systrace. |
| 8 | 8 |
| 9 This class represents an agent that captures traces from a particular | 9 This class represents an agent that captures traces from a particular |
| 10 tool (e.g. atrace, ftrace.) | 10 tool (e.g. atrace, ftrace.) |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 not completed within timeout interval. | 34 not completed within timeout interval. |
| 35 | 35 |
| 36 Args: | 36 Args: |
| 37 config: TracingConfig subclass containing agent-specific options | 37 config: TracingConfig subclass containing agent-specific options |
| 38 and categories. | 38 and categories. |
| 39 timeout: Timeout interval in seconds. | 39 timeout: Timeout interval in seconds. |
| 40 | 40 |
| 41 Returns: | 41 Returns: |
| 42 Boolean value indicating whether or not the trace started successfully. | 42 Boolean value indicating whether or not the trace started successfully. |
| 43 ''' | 43 ''' |
| 44 pass | 44 raise NotImplementedError |
| 45 | 45 |
| 46 def StopAgentTracing(self, timeout=None): | 46 def StopAgentTracing(self, timeout=None): |
| 47 '''Stops running the trace for this agent and returns immediately. | 47 '''Stops running the trace for this agent and returns immediately. |
| 48 Stops with timeout if not completed within timeout interval. | 48 Stops with timeout if not completed within timeout interval. |
| 49 | 49 |
| 50 Args: | 50 Args: |
| 51 timeout: Timeout interval in seconds. | 51 timeout: Timeout interval in seconds. |
| 52 | 52 |
| 53 Returns: | 53 Returns: |
| 54 Boolean value indicating whether or not the trace started successfully. | 54 Boolean value indicating whether or not the trace started successfully. |
| 55 ''' | 55 ''' |
| 56 pass | 56 raise NotImplementedError |
| 57 | 57 |
| 58 def SupportsExplicitClockSync(self): | 58 def SupportsExplicitClockSync(self): |
| 59 '''Find out if this agent supports recording of clock sync markers. | 59 '''Find out if this agent supports recording of clock sync markers. |
| 60 | 60 |
| 61 Returns: | 61 Returns: |
| 62 Boolean value indicating whether this agent supports recording | 62 Boolean value indicating whether this agent supports recording |
| 63 of clock sync markers. | 63 of clock sync markers. |
| 64 ''' | 64 ''' |
| 65 raise NotImplementedError | 65 raise NotImplementedError |
| 66 | 66 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 78 def GetResults(self, timeout=None): | 78 def GetResults(self, timeout=None): |
| 79 '''Get the completed trace for this agent, stopping with timeout | 79 '''Get the completed trace for this agent, stopping with timeout |
| 80 | 80 |
| 81 Get the completed trace for this agent. Call only after | 81 Get the completed trace for this agent. Call only after |
| 82 StopAgentTracing is done. This function blocks until the result | 82 StopAgentTracing is done. This function blocks until the result |
| 83 is collected (note; this may take several seconds). Stops with timeout | 83 is collected (note; this may take several seconds). Stops with timeout |
| 84 if not completed within self._options.collection_timeout seconds. | 84 if not completed within self._options.collection_timeout seconds. |
| 85 | 85 |
| 86 Args: | 86 Args: |
| 87 timeout: Timeout interval in seconds. | 87 timeout: Timeout interval in seconds. |
| 88 builder: Trace data builder. |
| 88 Returns: | 89 Returns: |
| 89 Completed trace for this agent. | 90 Completed trace for this agent. |
| 90 ''' | 91 ''' |
| 91 pass | 92 pass |
| 93 |
| 94 def CollectAgentTraceData(self, trace_data_builder): |
| 95 raise NotImplementedError |
| OLD | NEW |