Crates.io | riftrace |
lib.rs | riftrace |
version | 0.1.1 |
source | src |
created_at | 2023-05-29 20:15:29.108706 |
updated_at | 2023-05-29 20:41:33.740859 |
description | A library for interacting with Ftrace Linux kernel internal tracer |
homepage | https://github.com/ImanSeyed/riftrace |
repository | https://github.com/ImanSeyed/riftrace |
max_upload_size | |
id | 877301 |
size | 13,771 |
This library provides a simple API for reading Ftrace files.
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());