org.apache.lucene.benchmark.byTask.tasks
Class ReportTask

java.lang.Object
  extended by org.apache.lucene.benchmark.byTask.tasks.PerfTask
      extended by org.apache.lucene.benchmark.byTask.tasks.ReportTask
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
RepAllTask, RepSumByNameRoundTask, RepSumByNameTask, RepSumByPrefTask

public abstract class ReportTask
extends PerfTask

Report (abstract) task - all report tasks extend this task.


Field Summary
protected static java.lang.String[] COLS
           
protected static java.lang.String ELAPSED
           
protected static java.lang.String newline
           
protected static java.lang.String OP
          Get a textual summary of the benchmark results, average from all test runs.
protected static java.lang.String RECCNT
           
protected static java.lang.String RECSEC
           
protected static java.lang.String ROUND
           
protected static java.lang.String RUNCNT
           
protected static java.lang.String TOTMEM
           
protected static java.lang.String USEDMEM
           
 
Fields inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
NEW_LINE, params
 
Constructor Summary
ReportTask(PerfRunData runData)
           
 
Method Summary
protected  Report genPartialReport(int reported, java.util.LinkedHashMap partOfTasks, int totalSize)
           
protected  java.lang.String longestOp(java.util.Iterator taskStats)
          find the longest op name out of completed tasks.
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.
protected  java.lang.String tableTitle(java.lang.String longestOp)
          Compute a title line for a report table
protected  java.lang.String taskReportLine(java.lang.String longestOp, TaskStats stat)
          Compute a report line for the given task stat.
 
Methods inherited from class org.apache.lucene.benchmark.byTask.tasks.PerfTask
clone, doLogic, getDepth, getName, getParams, getRunData, isDisableCounting, runAndMaybeStats, setDepth, setDisableCounting, setName, setParams, setup, supportsParams, tearDown, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

newline

protected static final java.lang.String newline

OP

protected static final java.lang.String OP
Get a textual summary of the benchmark results, average from all test runs.

See Also:
Constant Field Values

ROUND

protected static final java.lang.String ROUND
See Also:
Constant Field Values

RUNCNT

protected static final java.lang.String RUNCNT
See Also:
Constant Field Values

RECCNT

protected static final java.lang.String RECCNT
See Also:
Constant Field Values

RECSEC

protected static final java.lang.String RECSEC
See Also:
Constant Field Values

ELAPSED

protected static final java.lang.String ELAPSED
See Also:
Constant Field Values

USEDMEM

protected static final java.lang.String USEDMEM
See Also:
Constant Field Values

TOTMEM

protected static final java.lang.String TOTMEM
See Also:
Constant Field Values

COLS

protected static final java.lang.String[] COLS
Constructor Detail

ReportTask

public ReportTask(PerfRunData runData)
Method Detail

shouldNeverLogAtStart

protected boolean shouldNeverLogAtStart()
Description copied from class: PerfTask
Tasks that should never log at start can overide this.

Overrides:
shouldNeverLogAtStart in class PerfTask
Returns:
true if this task should never log when it start.

shouldNotRecordStats

protected boolean shouldNotRecordStats()
Description copied from class: PerfTask
Tasks that should not record statistics can overide this.

Overrides:
shouldNotRecordStats in class PerfTask
Returns:
true if this task should never record its statistics.

tableTitle

protected java.lang.String tableTitle(java.lang.String longestOp)
Compute a title line for a report table

Parameters:
longestOp - size of longest op name in the table
Returns:
the table title line.

longestOp

protected java.lang.String longestOp(java.util.Iterator taskStats)
find the longest op name out of completed tasks.

Parameters:
taskStats - completed tasks to be considered.
Returns:
the longest op name out of completed tasks.

taskReportLine

protected java.lang.String taskReportLine(java.lang.String longestOp,
                                          TaskStats stat)
Compute a report line for the given task stat.

Parameters:
longestOp - size of longest op name in the table.
stat - task stat to be printed.
Returns:
the report line.

genPartialReport

protected Report genPartialReport(int reported,
                                  java.util.LinkedHashMap partOfTasks,
                                  int totalSize)


Copyright © 2000-2010 Apache Software Foundation. All Rights Reserved.