Class ExecutionTimesReport
java.lang.Object
com.carrotsearch.ant.tasks.junit4.listeners.ExecutionTimesReport
- All Implemented Interfaces:
AggregatedEventListener
A report listener that emits per-suite execution times information useful
for load balancing tests across JVMs.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidmergeHints(InputStream is, Map<String, List<Long>> hints) Read hints from a file and merge with the given hints map.mergeHints(Collection<org.apache.tools.ant.types.ResourceCollection> resources, Collection<String> suiteNames) Read hints from all resources in a collection, retainingsuiteNames.voidWrite back to hints file.voidRemember execution time for all executed suites.Read hints from a file.voidHints file (key-value pairs).voidsetHistoryLength(int length) How many execution times to store per-suite? The history must be larger than 0.voidLink to the container.static voidWrites back hints file.
-
Field Details
-
DEFAULT_HISTORY_LENGTH
public static final int DEFAULT_HISTORY_LENGTH- See Also:
-
hintsFile
The file where suite hints are stored/ updated. -
hints
-
historyLength
private int historyLength- See Also:
-
outer
Outer task.
-
-
Constructor Details
-
ExecutionTimesReport
public ExecutionTimesReport()
-
-
Method Details
-
setFile
Hints file (key-value pairs). -
setHistoryLength
public void setHistoryLength(int length) How many execution times to store per-suite? The history must be larger than 0. -
onSuiteResult
Remember execution time for all executed suites. -
onEnd
Write back to hints file. -
setOuter
Description copied from interface:AggregatedEventListenerLink to the container. Listener can throwBuildExceptionif parameter validation doesn't succeed, for example.- Specified by:
setOuterin interfaceAggregatedEventListener- Throws:
org.apache.tools.ant.BuildException
-
readHints
Read hints from a file.- Throws:
IOException
-
mergeHints
Read hints from a file and merge with the given hints map.- Throws:
IOException
-
writeHints
Writes back hints file.- Throws:
IOException
-
mergeHints
public static Map<String, List<Long>> mergeHints(Collection<org.apache.tools.ant.types.ResourceCollection> resources, Collection<String> suiteNames) Read hints from all resources in a collection, retainingsuiteNames. IfsuiteNamesis null, everything is retained.
-