Profiling for slow code on macOS?

Only tool I currently know is cargo flamegraph, but it seems not much information is shown here, is there any other tool to use on macOS?

My need is to figure out which lines of code caused it slow. Or maybe I can use docker Ubuntu for some Linux commands? What do you use, what do you suggest?

also heard about perf for Linux somewhere, not tried yet...

plus, came from Chrome, I quite miss the "Bottom-Up" panel which shows me the costly functions directly. what's the corresponding tool in Rust(text is okay)?

You can use Instruments, which is part of Xcode, to profile Mac programs.

I haven't tried it, but cargo-instruments looks like a useful way to run Instruments on Rust projects.


This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.