Skip to content

a rust trace profiler that outputs to chrome trace-viewer format (chrome://tracing).

License

Notifications You must be signed in to change notification settings

andjo403/rs_tracing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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");

About

a rust trace profiler that outputs to chrome trace-viewer format (chrome://tracing).

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages