tracing-profile-perfetto-sys

Crates.iotracing-profile-perfetto-sys
lib.rstracing-profile-perfetto-sys
version0.9.0
sourcesrc
created_at2024-09-16 20:41:17.735774
updated_at2024-12-04 17:11:11.750826
descriptionLow-level bindings to Perfetto, optionally used by the tracing-profile crate
homepage
repositoryhttps://gitlab.com/IrreducibleOSS/tracing-profile
max_upload_size
id1376876
size9,479,928
Jim Posen (jimpo-ulvt)

documentation

README

Perfetto-sys

This crate wraps the perfetto sdk. Use it as follows:

Create a PerfettoGuard which will live for the duration of the tracing session via PerfettoGuard::new. Two types of backend are supported:

  • BackendConfig::InProcess will record only the trace data from the current process.

  • BackendConfig::System will also record system data. To do this kind of tracing the perfetto tools binaries must be available. Note that the PerfettoGuard creation and dropping will take some additional time to launch and stop the perfetto processes. See the perfetto documentation for the details.

To create a span, create a TraceEvent via TraceEvent::new. The event will persist until the TraceEvent is dropped. Using custom track event arguments, track id and flow id are supported.

To update a counter value use set_counter_u64 and set_counter_f64 methods.

Resources:

Commit count: 23

cargo fmt