Package com.google.test.metric.report.chart

Examples of com.google.test.metric.report.chart.PieGraph.render()


    out.printf("      Analyzed classes: %5d%n", total);
    out.printf(" Excellent classes (.): %5d %5.1f%%%n", excellentCount, 100f * excellentCount / total);
    out.printf("      Good classes (=): %5d %5.1f%%%n", goodCount, 100f * goodCount / total);
    out.printf("Needs work classes (@): %5d %5.1f%%%n", needsWorkCount, 100f * needsWorkCount / total);
    PieGraph graph = new PieGraph(50, new CharMarker('.', '=', '@'));
    String chart = graph.render(excellentCount, goodCount, needsWorkCount);
    out.printf("             Breakdown: [%s]%n", chart);
  }

  public void printDistribution(int rows, int width) {
    TextHistogram histogram = new TextHistogram(width, rows, new Marker() {
View Full Code Here


    rows[0] = out.toString();
    for (int i = 0; i < counts.length; i++) {
      out.setLength(0);
      int bucketId = (int) (min + bucketWidth * i + bucketWidth / 2f);
      PieGraph pieGraph = new PieGraph(width, new CharMarker(marker.get(i, bucketId), ' '));
      String bar = pieGraph.render(counts[i], maxCount - counts[i]);
      formatter.format("%6d |%s:%6d", bucketId, bar, counts[i]);
      rows[i + 1] = out.toString();
    }
    return rows;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.