Search in sources :

Example 1 with Points

use of org.apache.lucene.benchmark.byTask.stats.Points in project lucene-solr by apache.

the class PerfTask method runAndMaybeStats.

/**
   * Run the task, record statistics.
   * @return number of work items done by this task.
   */
public final int runAndMaybeStats(boolean reportStats) throws Exception {
    if (!reportStats || shouldNotRecordStats()) {
        setup();
        int count = doLogic();
        count = disableCounting ? 0 : count;
        tearDown();
        return count;
    }
    if (reportStats && depth <= maxDepthLogStart && !shouldNeverLogAtStart()) {
        System.out.println("------------> starting task: " + getName());
    }
    setup();
    Points pnts = runData.getPoints();
    TaskStats ts = pnts.markTaskStart(this, runData.getConfig().getRoundNumber());
    int count = doLogic();
    count = disableCounting ? 0 : count;
    pnts.markTaskEnd(ts, count);
    tearDown();
    return count;
}
Also used : Points(org.apache.lucene.benchmark.byTask.stats.Points) TaskStats(org.apache.lucene.benchmark.byTask.stats.TaskStats)

Aggregations

Points (org.apache.lucene.benchmark.byTask.stats.Points)1 TaskStats (org.apache.lucene.benchmark.byTask.stats.TaskStats)1