pub struct TracingFacade { /* private fields */ }
Expand description
Perform tracing operations.
Note this object is shared among all threads created by server.
This facade does not hold onto a Tracing proxy as the server may be long-running while individual tests set up and tear down Tracing.
Implementations§
Source§impl TracingFacade
impl TracingFacade
pub fn new() -> TracingFacade
Sourcepub async fn initialize(&self, args: Value) -> Result<Value, Error>
pub async fn initialize(&self, args: Value) -> Result<Value, Error>
Initialize a trace session.
A trace session allows for starting and stopping the collection of trace data. Trace data is then returned all at once when [terminate] is called.
For documentation on the args parameter, see InitializeRequest.
There can only be one trace session active on the system at a time. If there is a trace session from another controller active on the system, initialize may still return success, as trace_manager accepts the initialize_tracing call as a no-op. If needed, [terminate] may be used to ensure that no trace session is active on the system.
Sourcepub async fn start(&self) -> Result<Value, Error>
pub async fn start(&self) -> Result<Value, Error>
Start tracing.
There must be a trace session initialized through this facade, otherwise an error is returned. Within a trace session, tracing may be started and stopped multiple times.
Sourcepub async fn stop(&self) -> Result<Value, Error>
pub async fn stop(&self) -> Result<Value, Error>
Stop tracing.
There must be a trace session initialized through this facade, otherwise an error is returned. Within a trace session, tracing may be started and stopped multiple times.
Sourcepub async fn terminate(&self, args: Value) -> Result<Value, Error>
pub async fn terminate(&self, args: Value) -> Result<Value, Error>
Terminate tracing and optionally download the trace data.
Any trace session on the system will be terminated whether initialized through this facade or through other means. Downloading trace data will only work for sessions initialized through this facade. Attempting to download trace data from another trace session will likely result in the request hanging as trace_manager will attempt to write the data to a socket with no readers.
For documentation on the args parameter, see TerminateRequest.