Class Algorithm
- java.lang.Object
-
- org.apache.lucene.benchmark.byTask.utils.Algorithm
-
- All Implemented Interfaces:
AutoCloseable
public class Algorithm extends Object implements AutoCloseable
Test algorithm, as read from file
-
-
Constructor Summary
Constructors Constructor Description Algorithm(PerfRunData runData)
Read algorithm from file Property examined: alt.tasks.packages == comma separated list of alternate package names where tasks would be searched for, when not found in the default package (that ofPerfTask
Object.getClass()
).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
execute()
Execute this algorithmArrayList<PerfTask>
extractTasks()
Expert: for test purposes, return all tasks participating in this algorithm.String
toString()
-
-
-
Constructor Detail
-
Algorithm
public Algorithm(PerfRunData runData) throws Exception
Read algorithm from file Property examined: alt.tasks.packages == comma separated list of alternate package names where tasks would be searched for, when not found in the default package (that ofPerfTask
Object.getClass()
). If the same task class appears in more than one package, the package indicated first in this list will be used.- Parameters:
runData
- perf-run-data used at running the tasks.- Throws:
Exception
- if errors while parsing the algorithm
-
-
Method Detail
-
extractTasks
public ArrayList<PerfTask> extractTasks()
Expert: for test purposes, return all tasks participating in this algorithm.- Returns:
- all tasks participating in this algorithm.
-
close
public void close() throws Exception
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
-