FileDocCategorySizeDatePackage
RepAllTask.javaAPI DocApache Lucene 2.2.02582Sat Jun 16 22:20:58 BST 2007org.apache.lucene.benchmark.byTask.tasks

RepAllTask

public class RepAllTask extends ReportTask
Report all statistics with no aggregations.
Other side effects: None.

Fields Summary
Constructors Summary
public RepAllTask(org.apache.lucene.benchmark.byTask.PerfRunData runData)

    super(runData);
   
Methods Summary
public intdoLogic()

    Report rp = reportAll(getRunData().getPoints().taskStats());
    
    System.out.println();
    System.out.println("------------> Report All ("+rp.getSize()+" out of "+rp.getOutOf()+")");
    System.out.println(rp.getText());
    System.out.println();
    return 0;
  
protected org.apache.lucene.benchmark.byTask.stats.ReportreportAll(java.util.List taskStats)
Report detailed statistics as a string

return
the report

    String longestOp = longestOp(taskStats.iterator());
    boolean first = true;
    StringBuffer sb = new StringBuffer();
    sb.append(tableTitle(longestOp));
    sb.append(newline);
    int reported = 0;
    Iterator it = taskStats.iterator();
    while (it.hasNext()) {
      TaskStats stat = (TaskStats) it.next();
      if (stat.getElapsed()>=0) { // consider only tasks that ended
        if (!first) {
          sb.append(newline);
        }
        first = false;
        String line = taskReportLine(longestOp, stat);
        reported++;
        if (taskStats.size()>2 && reported%2==0) {
          line = line.replaceAll("   "," - ");
        }
        sb.append(line);
      }
    }
    String reptxt = (reported==0 ? "No Matching Entries Were Found!" : sb.toString());
    return new Report(reptxt,reported,reported,taskStats.size());