Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 583 Bytes

profiling.md

File metadata and controls

19 lines (12 loc) · 583 Bytes

Profiling a block

Blocks can be profiled using pprof and thanks to the crate cpuprofiler.

In order to profile a block, the project must be compiled in debug mode with the profiling feature enabled:

cargo build --features profiling

In order to profile a given block e.g. load block:

./target/debug/i3status-rs --profile load --profile-runs 10000 <config>

where <config> is a path to a toml config file.

It will generate a load.profile which can be visualized using pprof.