-
Install it, and run
# Rust projects
cargo flamegraph
# Arbitrary binaries
flamegraph -- /path/to/binary
$ valgrind --tool=dhat ./program
-
https://youtu.be/JRMOIE_wAFk?si=Ngl2T0FWl74H8v_5
- 동영상내용 github 코드(https://github.com/bravit/generate_parentheses)
-
(230110) Heap profiling Rust programs with DHAT | chris biscardi
-
(240209) RustConf 2023 - Profiling async applications in Rust | Rust
-
samply
- samply is a command line CPU profiler which uses the Firefox profiler as its UI.
https://github.com/KDAB/hotspot
perf | |
gprof | |
callgrind / cachegrind |
|
DTrace | |
Other |
- https://nnethercote.github.io/perf-book/profiling.html
- There are many different profilers available, each with their strengths and weaknesses. The following is an incomplete list of profilers that have been used successfully on Rust programs.
memcpy
. It works on Linux and some other
Unixes. dhat-rs is an experimental alternative that is a little less
powerful and requires minor changes to your Rust program, but works on all
platforms.counts
supports ad hoc profiling, which combines the use of eprintln!
statement with frequency-based post-processing, which is good for getting
domain-specific insights into parts of your code. It works on all platforms.