Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Build statistics

I'm interested in how much time I am spending on building my projects every day. Is there any existing tool which provides such statistics?

Thanks!

like image 488
Danra Avatar asked Nov 08 '09 10:11

Danra


2 Answers

MSBuild (what VisualStudio uses to build) can provide you with this information. Include in your msbuild.exe call the PerformanceSummary switch:

msbuild.exe your.sln /clp:PerformanceSummary ...

That will give you something like this at the end of your build run log:

Project Performance Summary:
      374 ms  your.sln  1 calls

Target Performance Summary:
...
      109 ms  GetWinFXPath                               1 calls
      156 ms  EntityDeploy                               1 calls
      390 ms  Build                                      2 calls
...
Time Elapsed 00:00:00.43

If you want a file that contains only this information, rather than having it written to your console, you can use this switch (with logfile set to some path):

/logger:FileLogger,Microsoft.Build.Engine;logfile=perf.log;encoding=Unicode;performancesummary
like image 200
Justin R. Avatar answered Oct 05 '22 06:10

Justin R.


There is build event, you can use them, you can also run a batch script before and after a build to echo time >> filename

and then render the file and get your stats.

(goto build events in the project property page)

like image 20
Dani Avatar answered Oct 05 '22 05:10

Dani