All Versions
Clover 4.0 DocumentationClover 3.3 Documentation
Clover 3.2 Documentation
More...
This page contains instructions on how to tune Clover's performance when running your builds and measuring code coverage.
On this page:
Unique coverage relates to a line of code that was hit by only one test. Unique coverage tracking can be switched off to reduce CPU & memory usage when running Clover.
You can configure unique coverage reporting in the following Clover components:
If you use Clover in your build purely for Test Optimization purposes and not for coverage reporting, you can reduce the granularity of Clover instrumentation from statement to method level. The 'instrumentationLevel' attribute set to method level allows for speedier instrumentation, compilation & test execution.
This speeds up the build at the loss of some accuracy. This is the setting to use if you want to improve Clover's performance. When this attribute is set to 'statement' (the default), the builds will take longer but the optimization intelligence will also be stronger.
You can configure instrumentation level in the following Clover-for-Ant tasks:
See the Ant Task Reference for more information.
During your test runs, Clover tries to record total code coverage and per-test code coverage as efficiently as possible but defaults to settings best for applications which are not highly CPU intensive. If your application is highly CPU intensive and code coverage recording is causing slow running tests, the following options may assist:
Supply this option to the JVM running your tests:
-Dclover.pertest.coverage=diff
This changes the way per-test coverage is recorded at runtime to work faster for CPU intensive applications.
Supply this option to the JVM running your tests:
-Dclover.pertest.coverage=off
This tells Clover to not record any per-test coverage data at runtime. With this you gain a faster running time for CPU intensive applications, although you lose per-test coverage information.