Today I decided to contribute some patches to the upcoming NHibernate 2.0 release. First order of business was to get latest and then run:

nant clean build > output-debug-build.log

which compiles NHibernate and the unit tests. Unfortunately something went horribly wrong as the build finished early. Usually nant chews on a large project like NHibernate for awhile and then spits out something like this near the bottom of the output:

BUILD SUCCEEDED

Total time: 57.5 seconds.

I started splunking through the output to try to figure out what was wrong and noticed this at the bottom of the output:

BUILD SUCCEEDED

Total time: 11.9 seconds.

About 12 seconds to compile everything! I’m used to a quick return from nant usually meaning a failed compile. Not in this case. The Ultimate Developer Rig – Kovacs Edition is just plain fast. And that made me happy.

CORRECTION: The above NAnt command builds the unit tests, but doesn’t actually run them. Mea culpa.

UPDATE: I ran everything again including running the unit tests:

nant clean build test > output-debug-build.log

On my Latitude D820 (Core Duo 2.0 GHz), total time was 98.6 seconds.

On the Ultimate Developer Rig – Kovacs Edition, total time was 62.8 seconds.

Yes, unit tests – especially for NHibernate where you really have to touch the database for most tests – take time to run. Note that a really fast box doesn’t help unit test times as the unit tests take about 40 seconds to run regardless. This says to me that unit test times are dominated by the time spent communicating with the local SQL Server database.

N.B. NAnt does not support parallel builds. So only one core was kept busy. You can hack MSBuild to support parallel builds as documented by Scott Hanselman. Given the fact that most developers have at least dual if not quad-proc machines, I hope that build tools start officially supporting parallel builds.