Class PerfTask
An abstract task to be tested for performance.
Inheritance
Assembly: Lucene.Net.Benchmark.dll
Syntax
public abstract class PerfTask : object
Remarks
Every performance task extends this class, and provides its own DoLogic() method, which performs the actual task.
Tasks performing some work that should be measured for the task, can override Setup() and/or TearDown() and place that work there.
Relevant properties:
- task.max.depth.log
Also supports the following logging attributes:
- log.step specifies how often to log messages about the current running task. Default is 1000 DoLogic() invocations. Set to -1 to disable logging.
- log.step.[class Task Name] specifies the same as 'log.step', only for a particular task name. For example, log.step.AddDoc will be applied only for AddDocTask. It's a way to control per task logging settings. If you want to omit logging for any other task, include log.step=-1. The syntax is "log.step." together with the Task's 'short' name (i.e., without the 'Task' part).
Constructors
Name | Description |
---|---|
PerfTask(PerfRunData) |
Fields
Name | Description |
---|---|
m_logStep | |
m_params | |
NEW_LINE |
Properties
Name | Description |
---|---|
AlgLineNum | |
BackgroundDeltaPriority | |
Depth | Gets or Sets the depth. |
DisableCounting | Return |
Params | Gets the Params. |
RunData | Gets the run data. |
RunInBackground | |
ShouldNeverLogAtStart | Tasks that should never log at start can override this.
Returns |
ShouldNotRecordStats | Tasks that should not record statistics can override this.
Returns |
Stop | |
SupportsParams | Sub classes that support parameters must override this method to return
|
Methods
Name | Description |
---|---|
Clone() | |
Dispose() | |
Dispose(Boolean) | |
DoLogic() | 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. |
GetLogMessage(Int32) | |
GetName() | Returns the name. |
RunAndMaybeStats(Boolean) | Run the task, record statistics. |
SetName(String) | Sets the name. |
SetParams(String) | Set the params of this task. |
SetRunInBackground(Int32) | |
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. Only the work done in DoLogic() is 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. |
StopNow() | |
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. Only the work done in DoLogic()
is measured for this task. Notice that higher level (sequence) tasks
containing this task would then measure larger time than the sum of their |
ToString() |