TeamCity/Clover report interaction?

We are in the process of migrating from a custom in-house build system to TeamCity.  I have a build configuration using the Ant Runner to run a target that in turn runs a large number of other targets (wrapping up the entire build process) including building, unit testing and running Clover.  The build has a large amount of historical information that clover uses for checking that our code coverage maintains a certain level.

In our old build system, the clover report generation is very fast, taking ~2 minutes to complete the 'current' report.  When running the same target within TeamCity, this has been taking over 50 minutes.  I have yet to determine what is different between the two.  The builds are running on the same hardware, and utilizing the same clover data.  I was able to get the TeamCity configuration to complete the clover report in 18 minutes by setting the cache attribute to 1g and bumping up the number of threads for clover to 6.  That is still almost 10x slower though.

I noticed that the classpath is slightly different for the TeamCity build.  It has: /TeamCityAgent4/plugins/antPlugin/lib/buildServerAntRuntime.jar:/TeamCityAgent4/lib/runtime-util.jar injected into it (I'm assuming this is for TC to introspect the ant process better).  Is it possible that either of these two jars is impacting the clover report generation somehow?  I did not find any open issues relating to report generation, so it doesn't seem this is a common problem.  Any comments will be appreciated.

Thanks,

  Chris Schmidt

6 comments

I think we need more details. Can you try to analyze which specific target (or targets) takes more time under TeamCity?

0

It is the clover-report target that generates reports.  Currently, the ant target is configured to generate the current report and 3 historical reports (mix of html and pdf reports).

Thanks,

Chris

0

Our integration with Ant reports Ant steps back to TeamCity, nothing more. If this is the single task which works much slower under the TeamCity agent, then it is not clear to me how we could affect it. Is there any verbose or debug mode in that task?

0

  I think I have a better idea what the problem is.  The old build system ran the ant tasks as distinct steps so each was run in its own process. We created a unified ant target to compile/test/run reports for TeamCity. It appears that the clover report target is sensitive to some other target running before it.  I was able to reproduce the slowness by manually running the unified ant target on the build server.  The problem doesn't seem to be directly related to TeamCity, but will be a problem for us.  I tried setting the build configuration to run each target separately, but the report still takes a long time (I'm guessing that a single ant process is still being run by TeamCity).

  I noticed that the TeamCity 6 EAP has a change where you can chain build runners together.  Will this cause a separate ant process to be run?  If so, that will probably resolve the problem that we're encountering.

0

Chris,

I noticed that the TeamCity 6 EAP has a change where you can chain build runners together.  Will this cause a separate ant process to be run?  If so, that will probably resolve the problem that we're encountering.

Yes, each build step in TeamCity 6.0 is running independently, so in a separate process.

0

Thanks Yegor, I will try out the EAP and see if this resolves our problem.

0

Please sign in to leave a comment.