It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Multiple steps on a relatively large code base

Piergiuliano Bossi Feb 28, 2013

We have been using Clover driven by ant on a Jenkins build for quite some time now. The code base has grown and it's relatively large: roughly 500K NCLOC, 8500 files, 9000 classes, 8500 unit tests, 1700 acceptance/integration tests. The Jenkins build runs at night and it's quite resource intensive: for example, it requires 3 GB of memory to both compile and run all the tests.

We are wondering whether we can split this in multiple steps, so that the memory requirements are smaller, but all the data is still collected as it was run in one step and the historical reports work in the same way.

Can anybody shed some light and provide some guidance about this?


1 answer

1 accepted

1 vote
Answer accepted
Marek Parfianowicz Atlassian Team Feb 28, 2013

Hi Bob,

There are at least few possibilities:

1) You can split your project into several smaller modules. Instrument, compile and test them separately. Each of them will have it's own <clover-setup/> task and multiple clover.db files will be produced. After the build merge all databases using <clover-merge/> task in order to have a single Clover report.

2) You can define <fileset includes="..." excludes="..."> for <clover-setup/> and measure code coverage for most important code areas only. I recommend to exclude all generated code from instrumentation.

3) You can disable per-test code coverage (if you don't need such detail) recording. Thanks to this no clover.db*.s files will be produced (I guess that you have at least 10'000 of such files produced).

How to do this: in the <clover-setup> define that there are no test sources, e.g. <testsources dir=".." excludes="\*\*">

Main drawback: test results will not be collected by Clover so in the HTML report you have to add them manually (<clover-report>...<testresults>).

4) You can disable per-test coverage syntax highlighting in HTML report (it's disabled by default) - see <clover-report> ... <current showUniqueCoverage="false">. Clover will consume much less memory.

5) You can reduce instrumentation level from "statement" to "method" - see <clover-setup instrumentationLevel="method">. Main drawback is the much lower accuracy of course.


Marek Parfianowicz Atlassian Team Feb 28, 2013
Piergiuliano Bossi Mar 01, 2013

Thanks Marek. A Few comments:

  1. clover-merge is probably our best option
  2. we don't have much generated code, so it wouldn't make much of a difference
  3. we like the idea of having all the details
  4. I may play with this
  5. we prefer to work at the statement level

Thanks again!

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Opsgenie

Handling Opsgenie Alerts

Hi everyone, welcome to the kb articles for Opsgenie FAQs. I'm one of the Technical Support Engineers for Opsgenie who will be providing weekly posts on FAQs from customers.   All alerts are ...

72 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you