Profiling build performance?

I’d like to profile the performance of my cmake ninja build. To see how I can improve my build/linker speed.

Ideally I’d like to be able to distinguish compile vs linker time. Because my project is being bottlenecked at the linker phase.


(I’m using MSVC as my compiler)

Ninja writes a .ninja_log file where each build step is recorded. You can then convert that log file using to a format that can be read by Chrome’s about:tracing utility.

I hope this helps.


Cool I didn’t know that Ninja did that!

I guess it makes sense this type of thing is dependent on the generator you use.

Seems like a lot of effort to make that sort of thing cross platform and user friendly in cmake.