What do you want out of a Rust profiler?
I'm interested in writing a profiler GUI for Rust programs. What would you want to see out of such a tool?
- Shelling out to perf (or equivalent for non-linux platforms) and running your binary with it, or adding a library that you call functions from to measure specific pieces of code using std::time::Instant::elapsed()?
- What kind of profiling? Just cpu profiling? cache misses? memory usage? gpu profiling? system call profiling? All at once?
- What kind of statistics? Average, range, 95th%?
- Cargo benchmark and unit test support? Cargo examples support?
- How do you want to filter the information? By crate, function name, execution time, execution samples, thread, etc?
- How should I present information? Flamegraph? Line/pie/etc graph? Call tree? A flat table?
- How should multiple threads be handled? Interleaved information, separate graphs/tabs, etc?
Start to finish, how would you imagine using this tool? When would you want to use it, and how would you use it? What information would you first look at to understand your program's performance?
Lastly, please share your stories of previous times you've used a profiler - what the problem was, how you used it, how it helped you solve the issue, what you liked, what you disliked, etc.
Any thoughts, experiences, or information in general that you think would be useful to me would be greatly appreciated.
For context, I previously wrote a profiler (and functioning GUI, although incomplete) specifically for profiling games. However, I wasn't satisfied with both the profiling aspect, as well as the GUI design. I'm looking to start again from scratch.