Crates.io | tracing-perfetto |
lib.rs | tracing-perfetto |
version | |
source | src |
created_at | 2024-07-01 08:12:59.294606 |
updated_at | 2025-01-02 09:27:26.993167 |
description | Tracing layer for recording spans and events as perfetto event format. |
homepage | |
repository | https://github.com/csmoe/tracing-perfetto |
max_upload_size | |
id | 1288544 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
tracing-perfetto is a Layer for tracing-subscriber that outputs traces in perfetto's trace packet format that can be viewed with ui.perfetto.dev.
Add this near the beginning of main
:
use tracing_perfetto::PerfettoLayer;
use tracing_subscriber::{registry::Registry, prelude::*};
let layer = PerfettoLayer::new(std::sync::Mutex::new(std::fs::File::create("/tmp/test.pftrace").unwrap()));
tracing_subscriber::registry().with(layer).init();
Open that file with ui.perfetto.dev:
perfetto_trace.proto
Download the latest perfetto_trace.proto into protos/peffetto_trace.proto
.
Run upgrade.rs
cargo +nightly -Zscript upgrade.rs
./upgrade.rs
Create a pull request with the changes.
Licensed under the MIT license