Crate pprof[−][src]
pprof-rs is an integrated profiler for rust program.
This crate provides a programable interface to start/stop/report a profiler dynamically. With the help of this crate, you can easily integrate a profiler into your rust program in a modern, convenient way.
A sample usage is:
let guard = pprof::ProfilerGuard::new(100).unwrap();
Then you can read report from the guard:
if let Ok(report) = guard.report().build() { println!("report: {:?}", &report); };
You can find more details in README.md
Modules
| flamegraph | Tools for producing flame graphs from folded stack traces. |
| protos |
Structs
| Collector | |
| Frames | A representation of a backtrace. |
| ProfilerGuard | RAII structure used to stop profiling when dropped. It is the only interface to access profiler. |
| Report | The final presentation of a report which is actually an |
| ReportBuilder | A builder of |
| StackHashCounter | |
| Symbol | Symbol is a representation of a function symbol. It contains name and addr of it. If built with debug message, it can also provide line number and filename. The name in it is not demangled. |
Enums
| Error |
Constants
| MAX_DEPTH | Define the MAX supported stack depth. TODO: make this variable mutable. |
| MAX_THREAD_NAME | Define the MAX supported thread name length. TODO: make this variable mutable. |
Type Definitions
| Result |