clover html-report taking a LONG time

We are seeing report generation take upwards of 4 hours. I'm using the following to generate the html report:

<clover-report coverageCacheSize="2048">
					<current 	outfile="${work.dir}/clover-reports/html" 
								title="Clover HTML Report" 
						<format type="html"/>
						<testresults dir="${work.dir}/test-results" includes="TEST-*.xml"/>

The ant process spawning this command is being given 8g for memory. There are a few hundred
unit tests but the project src itself is roughly 2g. Does Atlassian recommend any jvm tuning parameters?
I know that is a bit of a "loaded" , w/ respect to jvm tuning question but for big projects do you guys
have anything which works best in these types of scenarios? Is there a limit to the number of threads
to give this report generation such that it will no longer matter? Any help would be great.

2 answers

1 accepted

1 vote
Accepted answer

You could try:

  • setting coverageCacheSize="nocache" - this value is a little misleading, but it will force all coverage data to be loaded into memory
  • experimenting with different values for numThreads - 0,2,4,8 ... - the best value is not necessarily the highest one; it depends on number of processor cores, disk, memory etc.
  • adding the <fileset> - focus on the most important classes (skip generated sources, for example)


0 votes

There is also another option possible - disabling per-test coverage in both instrumentation and reporting. You have to a) override default test detection algorithm by definining an empty expression pattern for test classes in <clover-setup/> or <clover-instr/> task; thanks to this, clover.db***.s coverage files won't be generated, b) disable per-test coverage in <clover-report/> task


    &lt;testsources dir="src/test"&gt;
        &lt;testclass name="^$"/&gt;
    &lt;current showUniqueCoverage="false"&gt;

Drawbacks: a) you will see global coverage only and won't be able to click on a source line to open a pop-up and see which test cases hit certain line; b) you won't see test classes on "Tests" tab and test results in the report.


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Thursday in Agile

How Scrum works? It starts with training and education

To answer “How scrum works,” most of the teams I've worked with first addressed the question: “where to start?”  That question applies to both implementation and improvements on the Scrum framew...

195 views 3 5
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you