How to measure the build execution time?


I am having build script in msbuild which will be invoked by powershell.

Build log file would look like this.

Build started 12/19/2011 2:01:54 PM.

Build succeeded.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:00.28

At starting point it will specify the build execution initiated time and the end it will say Time elapsed.

I would like to find the execution time using powershell or msbuild. How can i add all the time elapsed value or find the difference between last build started occurrence with first build occurrence?

As it is in log file , i don’t know how to retrieve this and measure.


Use Measure-Commmand to see how long is your build process. Here’s an example:

The output on my machine was:


How to measure the build execution time? by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply