1 unstable release
0.1.1 | May 29, 2023 |
---|---|
0.1.0 |
|
#392 in Value formatting
13KB
199 lines
Description
This library provides a simple API for reading Ftrace files.
Examples
use riftrace::{self, Tracer, TracingStat};
// Change current tracer from nop to function_graph
riftrace::set_current_tracer(Tracer::FunctionGraph).unwrap();
// Turn tracing on
riftrace::set_tracing_on(TracingStat::On).unwrap();
// Limit the trace to only "net*"
riftrace::set_ftrace_filter("net*", false).unwrap();
// Print out the output of the trace in a human readable format
println!("{}", riftrace::trace().unwrap());
lib.rs
:
This crate provides a simple API for reading Ftrace files.
Examples
use riftrace::{self, Tracer, TracingStat};
// Change current tracer from nop to function_graph
riftrace::set_current_tracer(Tracer::FunctionGraph).unwrap();
// Turn tracing on
riftrace::set_tracing_on(TracingStat::On).unwrap();
// Limit the trace to only "net*"
riftrace::set_ftrace_filter("net*", false).unwrap();
// Print out the output of the trace in a human readable format
println!("{}", riftrace::trace().unwrap());