# Profiling build performance?

**URL:** https://discourse.cmake.org/t/profiling-build-performance/2443
**Category:** Usage
**Created:** [December 29, 2020, 8:33pm UTC](https://discourse.cmake.org/t/profiling-build-performance/2443 "2020-12-29T20:33:23Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![YMba9g8j9CJp0wLoQf5y](https://discourse.cmake.org/user_avatar/discourse.cmake.org/ymba9g8j9cjp0wloqf5y/32/1244_2.png) [@YMba9g8j9CJp0wLoQf5y](https://discourse.cmake.org/u/YMba9g8j9CJp0wLoQf5y)
#### Post date: [December 29, 2020, 8:33pm UTC](https://discourse.cmake.org/t/profiling-build-performance/2443/1 "2020-12-29T20:33:23Z")

</div>

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.

Thoughts?

EDIT:  
(I’m using MSVC as my compiler)

---

<div class="post-metadata">

### Author: ![McMartin](https://discourse.cmake.org/user_avatar/discourse.cmake.org/mcmartin/32/150_2.png) [@McMartin](https://discourse.cmake.org/u/McMartin)
#### Post date: [December 31, 2020, 10:24am UTC](https://discourse.cmake.org/t/profiling-build-performance/2443/2 "2020-12-31T10:24:45Z")

</div>

Ninja writes a `.ninja_log` file where each build step is recorded. You can then convert that log file using [https://github.com/nico/ninjatracing](https://github.com/nico/ninjatracing) to a format that can be read by Chrome’s `about:tracing` utility.

I hope this helps.

---

<div class="post-metadata">

### Author: ![YMba9g8j9CJp0wLoQf5y](https://discourse.cmake.org/user_avatar/discourse.cmake.org/ymba9g8j9cjp0wloqf5y/32/1244_2.png) [@YMba9g8j9CJp0wLoQf5y](https://discourse.cmake.org/u/YMba9g8j9CJp0wLoQf5y)
#### Post date: [December 31, 2020, 6:17pm UTC](https://discourse.cmake.org/t/profiling-build-performance/2443/3 "2020-12-31T18:17:52Z")

</div>

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.
