What is the best way to measure build times?

439 views
Skip to first unread message

Pete Williamson

unread,
Feb 24, 2014, 1:07:56 PM2/24/14
to chromi...@chromium.org
I'd like to look into what can be done to improve build times across the board.  Perhaps my first step should be measuring the build times.  What is the best way to measure how much time a build takes?  Ideally I could separate out the time to further granularity such as compile time and link time.

Ideas so far:
  • use "time ninja -C out/Debug chrome" to get end to end time. (not sure what to do for windows here...)
  • look at "out/Debug/.ninja_log, possibly parsing it with automated tools
  • Modify ninja code to have a command line option to emit total time (perhaps in build.cc's BuildStaus::BuildFinished)
  • Modify the ninja wrapper script
Thanks!

Thiago Farina

unread,
Feb 24, 2014, 1:10:03 PM2/24/14
to pet...@google.com, Chromium-dev
On Mon, Feb 24, 2014 at 3:07 PM, Pete Williamson <pet...@google.com> wrote:
I'd like to look into what can be done to improve build times across the board.  Perhaps my first step should be measuring the build times.  What is the best way to measure how much time a build takes?  Ideally I could separate out the time to further granularity such as compile time and link time.

Ideas so far:
  • use "time ninja -C out/Debug chrome" to get end to end time. (not sure what to do for windows here...)

Scott Graham

unread,
Feb 24, 2014, 1:21:00 PM2/24/14
to Pete Williamson, chromium-dev
Nico (and Nikhil Bhargava as an intern project) had some clang instrumentation that attributed time to particular files i.e. not just translation unit, but also which header (and potentially finer?), and also broke the time down by compiler phase. I think the march of time has eaten links to the old results though.

cl...@chromium.org might know more details.



--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Nico Weber

unread,
Mar 3, 2014, 5:23:27 PM3/3/14
to Scott Graham, Pete Williamson, chromium-dev, Nick Carter
Here's a script to convert .ninja_logs into treemaps: http://comments.gmane.org/gmane.comp.web.chromium.devel/49092 / https://github.com/nico/buildbloat

Also, I think Nick has a script to convert .ninja_log files to about:tracing files.

If you're interested, I can try and find Nikhil's results too.
Reply all
Reply to author
Forward
0 new messages