scuffle-pprof
[!WARNING]
This crate is under active development and may not be stable.
A crate designed to provide a more ergonomic interface to the pprof crate.
Example
// Create a new CPU profiler with a sampling frequency of 1000 Hz and an empty ignore list.
let cpu = ;
// Capture a pprof profile for 10 seconds.
// This call is blocking. It is recommended to run it in a separate thread.
let capture = cpu.capture.unwrap;
// Write the profile to a file.
write.unwrap;
Analyzing the profile
The resulting profile can be analyzed using the pprof tool.
For example, to generate a flamegraph:
Status
This crate is currently under development and is not yet stable.
Unit tests are not yet fully implemented. Use at your own risk.
License
This project is licensed under the MIT or Apache-2.0 license. You can choose between one of them if you use this work.
SPDX-License-Identifier: MIT OR Apache-2.0