| java.lang.Object org.apache.lucene.benchmark.byTask.tasks.PerfTask
All known Subclasses: org.apache.lucene.benchmark.byTask.tasks.ReadTask, org.apache.lucene.benchmark.byTask.tasks.ResetInputsTask, org.apache.lucene.benchmark.byTask.tasks.CloseIndexTask, org.apache.lucene.benchmark.byTask.tasks.OptimizeTask, org.apache.lucene.benchmark.byTask.tasks.TaskSequence, org.apache.lucene.benchmark.byTask.tasks.ReportTask, org.apache.lucene.benchmark.byTask.tasks.WriteLineDocTask, org.apache.lucene.benchmark.byTask.tasks.ClearStatsTask, org.apache.lucene.benchmark.byTask.tasks.CreateIndexTask, org.apache.lucene.benchmark.byTask.tasks.DeleteDocTask, org.apache.lucene.benchmark.byTask.tasks.SetPropTask, org.apache.lucene.benchmark.byTask.tasks.AddDocTask, org.apache.lucene.benchmark.byTask.tasks.NewAnalyzerTask, org.apache.lucene.benchmark.byTask.tasks.NewRoundTask, org.apache.lucene.benchmark.byTask.tasks.OpenIndexTask, org.apache.lucene.benchmark.byTask.tasks.OpenReaderTask, org.apache.lucene.benchmark.byTask.tasks.CloseReaderTask, org.apache.lucene.benchmark.byTask.tasks.ReadTokensTask,
PerfTask | abstract public class PerfTask implements Cloneable(Code) | | A (abstract) task to be tested for performance.
Every performance task extends this class, and provides its own doLogic() method,
which performss the actual task.
Tasks performing some work that should be measured for the task, can overide setup() and/or tearDown() and
placed that work there.
Relevant properties: task.max.depth.log .
|
Method Summary | |
protected Object | clone() | abstract public int | doLogic() Perform the task once (ignoring repetions specification)
Return number of work items done by this task. | public int | getDepth() | int | getMaxDepthLogStart() | public String | getName() | String | getPadding() | public String | getParams() | public PerfRunData | getRunData() | final public int | runAndMaybeStats(boolean reportStats) Run the task, record statistics. | public void | setDepth(int depth) | protected void | setName(String name) | public void | setParams(String params) Set the params of this task. | public void | setup() Task setup work that should not be measured for that specific task.
By default it does nothing, but tasks can implement this, moving work from
doLogic() to this method. | 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. | public boolean | supportsParams() Sub classes that supports parameters must overide this method to return true. | public void | tearDown() Task tearDown work that should not be measured for that specific task.
By default it does nothing, but tasks can implement this, moving work from
doLogic() to this method. | public String | toString() |
doLogic | abstract public int doLogic() throws Exception(Code) | | Perform the task once (ignoring repetions 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.
number of work items done by this task. |
getDepth | public int getDepth()(Code) | | Returns the depth. |
getMaxDepthLogStart | int getMaxDepthLogStart()(Code) | | Returns the maxDepthLogStart. |
getParams | public String getParams()(Code) | | Returns the Params. |
runAndMaybeStats | final public int runAndMaybeStats(boolean reportStats) throws Exception(Code) | | Run the task, record statistics.
number of work items done by this task. |
setDepth | public void setDepth(int depth)(Code) | | Parameters: depth - The depth to set. |
setName | protected void setName(String name)(Code) | | Parameters: name - The name to set. |
setup | public void setup() throws Exception(Code) | | Task setup work that should not be measured for that specific task.
By default it does nothing, but tasks can implement this, moving work from
doLogic() to this method. Only the work done in doLogicis measured for this task.
Notice that higher level (sequence) tasks containing this task would then
measure larger time than the sum of their contained tasks.
throws: Exception - |
shouldNeverLogAtStart | protected boolean shouldNeverLogAtStart()(Code) | | Tasks that should never log at start can overide this.
true if this task should never log when it start. |
shouldNotRecordStats | protected boolean shouldNotRecordStats()(Code) | | Tasks that should not record statistics can overide this.
true if this task should never record its statistics. |
supportsParams | public boolean supportsParams()(Code) | | Sub classes that supports parameters must overide this method to return true.
true iff this task supports command line params. |
tearDown | public void tearDown() throws Exception(Code) | | Task tearDown work that should not be measured for that specific task.
By default it does nothing, but tasks can implement this, moving work from
doLogic() to this method. Only the work done in doLogicis measured for this task.
Notice that higher level (sequence) tasks containing this task would then
measure larger time than the sum of their contained tasks.
|
|
|