Class TaskSequence
java.lang.Object
org.apache.lucene.benchmark.byTask.tasks.PerfTask
org.apache.lucene.benchmark.byTask.tasks.TaskSequence
- All Implemented Interfaces:
Cloneable
Sequence of parallel or sequential tasks.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTaskSequence
(PerfRunData runData, String name, TaskSequence parent, boolean parallel) -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected TaskSequence
clone()
void
close()
int
doLogic()
Perform the task once (ignoring repetitions specification) Return number of work items done by this task.getName()
int
getRate()
Returns the rate per minute: how many operations should be performed in a minute.int
getTasks()
boolean
Return true if can be collapsed in case it is outermost sequenceboolean
void
Execute child tasks in a way that they do not report their time separately.void
setRate
(int rate, boolean perMin) void
setRepetitions
(int repetitions) void
setRunTime
(double sec) void
stopNow()
toString()
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
-
Field Details
-
REPEAT_EXHAUST
public static int REPEAT_EXHAUST
-
-
Constructor Details
-
TaskSequence
-
-
Method Details
-
close
-
isParallel
public boolean isParallel()- Returns:
- Returns the parallel.
-
getRepetitions
public int getRepetitions()- Returns:
- Returns the repetitions.
-
setRunTime
- Throws:
Exception
-
setRepetitions
- Parameters:
repetitions
- The repetitions to set.- Throws:
Exception
-
getParent
- Returns:
- Returns the parent.
-
doLogic
Description copied from class:PerfTask
Perform 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. -
stopNow
public void stopNow() -
addTask
-
toString
-
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.
-
getName
-
getTasks
- Returns:
- Returns the tasks.
-
clone
- Overrides:
clone
in classPerfTask
- Throws:
CloneNotSupportedException
-
isCollapsable
public boolean isCollapsable()Return true if can be collapsed in case it is outermost sequence
-