Class TaskSequence
- java.lang.Object
-
- org.apache.lucene.benchmark.byTask.tasks.PerfTask
-
- org.apache.lucene.benchmark.byTask.tasks.TaskSequence
-
-
Constructor Summary
Constructors Constructor Description TaskSequence(PerfRunData runData, String name, TaskSequence parent, boolean parallel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTask(PerfTask task)protected TaskSequenceclone()voidclose()intdoLogic()Perform the task once (ignoring repetitions specification) Return number of work items done by this task.StringgetName()TaskSequencegetParent()intgetRate()Returns the rate per minute: how many operations should be performed in a minute.intgetRepetitions()ArrayList<PerfTask>getTasks()booleanisCollapsable()Return true if can be collapsed in case it is outermost sequencebooleanisParallel()voidsetNoChildReport()Execute child tasks in a way that they do not report their time separately.voidsetRate(int rate, boolean perMin)voidsetRepetitions(int repetitions)voidsetRunTime(double sec)voidstopNow()StringtoString()-
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
getAlgLineNum, getBackgroundDeltaPriority, getDepth, getLogMessage, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setAlgLineNum, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, supportsParams, tearDown
-
-
-
-
Constructor Detail
-
TaskSequence
public TaskSequence(PerfRunData runData, String name, TaskSequence parent, boolean parallel)
-
-
Method Detail
-
isParallel
public boolean isParallel()
- Returns:
- Returns the parallel.
-
getRepetitions
public int getRepetitions()
- Returns:
- Returns the repetitions.
-
setRepetitions
public void setRepetitions(int repetitions) throws Exception- Parameters:
repetitions- The repetitions to set.- Throws:
Exception
-
getParent
public TaskSequence getParent()
- Returns:
- Returns the parent.
-
doLogic
public int doLogic() throws ExceptionDescription copied from class:PerfTaskPerform the task once (ignoring repetitions specification) Return number of work items done by this task. For indexing that can be number of docs added. For warming that can be number of scanned items, etc.
-
addTask
public void addTask(PerfTask task)
-
setNoChildReport
public void setNoChildReport()
Execute child tasks in a way that they do not report their time separately.
-
getRate
public int getRate()
Returns the rate per minute: how many operations should be performed in a minute. If 0 this has no effect.- Returns:
- the rate per min: how many operations should be performed in a minute.
-
setRate
public void setRate(int rate, boolean perMin)- Parameters:
rate- The rate to set.
-
clone
protected TaskSequence clone() throws CloneNotSupportedException
- Overrides:
clonein classPerfTask- Throws:
CloneNotSupportedException
-
isCollapsable
public boolean isCollapsable()
Return true if can be collapsed in case it is outermost sequence
-
-