rs_tracing

Crates.iors_tracing
lib.rsrs_tracing
version1.1.0
sourcesrc
created_at2019-01-26 22:12:59.588935
updated_at2022-12-18 21:16:13.611856
descriptiontrace events in the trace event format
homepage
repositoryhttps://github.com/andjo403/rs_tracing.git
max_upload_size
id110816
size18,936
Andreas Jonson (andjo403)

documentation

https://docs.rs/rs_tracing/

README

Traces to Chrome's trace_event format

Example

Cargo.toml:

rs_tracing = { version = "1.0", features = ["rs_tracing"] }

main.rs:

fn main() {
    open_trace_file!(".").unwrap();
    {
        trace_scoped!("complete","custom data":"main");
        trace_expr!("trace_expr", println!("trace_expr"));
        trace_begin!("duration");
        println!("trace_duration");
        trace_end!("duration");
    }
    close_trace_file!();
}

also possible to add custom data to all the macros formated like the serde_json::json! macro e.g.

trace_scoped!("complete","custom":230,"more":"data");
Commit count: 38

cargo fmt