How do I profile a short-running application on Windows?

All of the tutorials / blog posts I can find on profiling Rust on Windows attach to a running process.

But that doesn't work for me; I have a "short running" benchmark that I'm trying to find where it's spending its time, so I can try to contextualize unexpected results of a change (being two benchmarks doing similar work having drastically opposite results, one having a 10% regression and the other a 50% improvement in throughput).

I've managed to get debugging (breakpoints) working in vscode, but as far as I can tell, you can't actually profile (native) code from vscode.

On the other hand, I've had no luck getting Visual Studio 2019 to build (let alone run, debug, or profile) the project.

You can read from the console in main, attach to the running process, then supply the keyboard input.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.