clover html-report taking a LONG time

Christopher Dancy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 3, 2012

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" 
								alwaysReport="true"
								showUniqueCoverage="false"
								summary="false"
								numThreads="6">
						<format type="html"/>
						<testresults dir="${work.dir}/test-results" includes="TEST-*.xml"/>
					</current>
					
				</clover-report>

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
Answer accepted
Marek Parfianowicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 8, 2012

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)

Regards
Marek

0 votes
Marek Parfianowicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 12, 2012

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

Example:

&lt;clover-setup&gt;
    ...
    &lt;testsources dir="src/test"&gt;
        &lt;testclass name="^$"/&gt;
    &lt;/testsources&gt;
&lt;/clover-setup&gt;
...
&lt;clover-report&gt;
    &lt;current showUniqueCoverage="false"&gt;
        ...
    &lt;/current&gt;
&lt;/clover-report&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.

Cheers
Marek

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events