public abstract class PerfTask extends Object implements Cloneable
task.max.depth.log
.Modifier and Type | Field and Description |
---|---|
protected static String |
NEW_LINE |
protected String |
params |
Constructor and Description |
---|
PerfTask(PerfRunData runData) |
Modifier and Type | Method and Description |
---|---|
protected Object |
clone() |
abstract int |
doLogic()
Perform the task once (ignoring repetions specification)
Return number of work items done by this task.
|
int |
getDepth() |
String |
getName() |
String |
getParams() |
PerfRunData |
getRunData() |
boolean |
isDisableCounting()
Return true if counting is disabled for this task.
|
int |
runAndMaybeStats(boolean reportStats)
Run the task, record statistics.
|
void |
setDepth(int depth) |
void |
setDisableCounting(boolean disableCounting)
|
protected void |
setName(String name) |
void |
setParams(String params)
Set the params of this task.
|
void |
setup()
Task setup work that should not be measured for that specific task.
|
protected boolean |
shouldNeverLogAtStart()
Tasks that should never log at start can overide this.
|
protected boolean |
shouldNotRecordStats()
Tasks that should not record statistics can overide this.
|
boolean |
supportsParams()
Sub classes that supports parameters must overide this method to return true.
|
void |
tearDown()
Task tearDown work that should not be measured for that specific task.
|
String |
toString() |
public PerfTask(PerfRunData runData)
protected Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public final int runAndMaybeStats(boolean reportStats) throws Exception
Exception
public abstract int doLogic() throws Exception
Exception
public String getName()
protected void setName(String name)
name
- The name to set.public PerfRunData getRunData()
public int getDepth()
public void setDepth(int depth)
depth
- The depth to set.protected boolean shouldNeverLogAtStart()
protected boolean shouldNotRecordStats()
public void setup() throws Exception
Exception
public void tearDown() throws Exception
Exception
public boolean supportsParams()
public void setParams(String params)
UnsupportedOperationException
- for tasks supporting command line parameters.public String getParams()
public boolean isDisableCounting()
public void setDisableCounting(boolean disableCounting)
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.