On 29/09/2010, at 2:51 AM, Steve Appling wrote: > I've been working on making one of my builds faster and added a simple build > profiling report to gradle to help with my investigation. I think this may > be useful to others and I would like some feedback on it. It is currently > checked in to the profile branch. > > Profiling is triggered by using the --profile option. It writes an html > report to <build_dir>/reports/profile/. The reports are named based off of > the time when the report was run. > > As an example, I ran it twice on gradle itself. The first time was "gradlew > -xtest build --profile" after a clean (but with scripts and buildSrc built). > <profile-2010-09-28-09-00-01.html> > Configuration times and execution times are sorted with most expensive first. > > The second run was "gradlew -xtest build --profile" again, now that most > things should be up to date. > <profile-2010-09-28-09-14-27.html> > With everything up to date, it is now obvious that the checkstyle tasks are > not appropriately participating in the up-to-date checking. They probably > shouldn't run if the compile task doesn't need to run.
The up-to-date checking is working fine in this case. For the Gradle build, we add a second checkstyle task to check the headers of the groovy source. It was configured to write to the same result file as the standard checkstyle task. And so, they were scribbling over each other's results file. I've changed the configuration so they have separate result files, and everything seems to be working fine now. > Checkstyle tasks account for over half of the task execution time. > Additionally, buildSrc also generates a profile report (not attached). It > takes 3.4 seconds even with nothing to do. It might be useful to include a breakdown for buildSrc in the report. > > I would appreciate any feedback. Does this seem useful? Is this format OK? > Is there any additional information that would be useful? I think this is fantastic. -- Adam Murdoch Gradle Developer http://www.gradle.org CTO, Gradle Inc. - Gradle Training, Support, Consulting http://www.gradle.biz
