org.apache.lucene.benchmark.byTask.tasks
Class TaskSequence
java.lang.Object
org.apache.lucene.benchmark.byTask.tasks.PerfTask
org.apache.lucene.benchmark.byTask.tasks.TaskSequence
- All Implemented Interfaces:
- Cloneable
public class TaskSequence
- extends PerfTask
Sequence of parallel or sequential tasks.
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask |
getBackgroundDeltaPriority, getDepth, getLogMessage, getParams, getRunData, getRunInBackground, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setRunInBackground, setup, shouldNeverLogAtStart, shouldNotRecordStats, supportsParams, tearDown |
REPEAT_EXHAUST
public static int REPEAT_EXHAUST
TaskSequence
public TaskSequence(PerfRunData runData,
String name,
TaskSequence parent,
boolean parallel)
close
public void close()
throws Exception
- Overrides:
close
in class PerfTask
- Throws:
Exception
isParallel
public boolean isParallel()
- Returns:
- Returns the parallel.
getRepetitions
public int getRepetitions()
- Returns:
- Returns the repetitions.
setRunTime
public void setRunTime(double sec)
throws Exception
- Throws:
Exception
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 Exception
- 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.
- Specified by:
doLogic
in class PerfTask
- Returns:
- number of work items done by this task.
- Throws:
Exception
stopNow
public void stopNow()
- Overrides:
stopNow
in class PerfTask
addTask
public void addTask(PerfTask task)
toString
public String toString()
- Overrides:
toString
in class PerfTask
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
public String getName()
- Overrides:
getName
in class PerfTask
- Returns:
- Returns the name.
getTasks
public ArrayList<PerfTask> getTasks()
- Returns:
- Returns the tasks.
clone
protected Object clone()
throws CloneNotSupportedException
- Overrides:
clone
in class PerfTask
- Throws:
CloneNotSupportedException
isCollapsable
public boolean isCollapsable()
- Return true if can be collapsed in case it is outermost sequence
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.