FileDocCategorySizeDatePackage
Points.javaAPI DocApache Lucene 2.2.02691Sat Jun 16 22:21:00 BST 2007org.apache.lucene.benchmark.byTask.stats

Points

public class Points extends Object
Test run data points collected as the test proceeds.

Fields Summary
private org.apache.lucene.benchmark.byTask.utils.Config
config
private ArrayList
points
private int
nextTaskRunNum
Constructors Summary
public Points(org.apache.lucene.benchmark.byTask.utils.Config config)
Create a Points statistics object.


           
      
    this.config = config;
  
Methods Summary
public voidclearData()
Clear all data, prepare for more tests.

    points.clear();
  
public synchronized voidmarkTaskEnd(TaskStats stats, int count)
mark the end of a task

    int numParallelTasks = nextTaskRunNum - 1 - stats.getTaskRunNum();
    // note: if the stats were cleared, might be that this stats object is 
    // no longer in points, but this is just ok.
    stats.markEnd(numParallelTasks, count);
  
public synchronized TaskStatsmarkTaskStart(org.apache.lucene.benchmark.byTask.tasks.PerfTask task, int round)
Mark that a task is starting. Create a task stats for it and store it as a point.

param
task the starting task.
return
the new task stats created for the starting task.

    TaskStats stats = new TaskStats(task, nextTaskRunNum(), round);
    points.add(stats);
    return stats;
  
private synchronized intnextTaskRunNum()

    return nextTaskRunNum++;
  
public java.util.ListtaskStats()
Return the current task stats. the actual task stats are returned, so caller should not modify this task stats.

return
current {@link TaskStats}.

    return points;