Examples of PieGraph


Examples of com.google.test.metric.report.chart.PieGraph

    int total = costs.size();
    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);
  }
View Full Code Here

Examples of com.google.test.metric.report.chart.PieGraph

    formatter.format("%8d %" + width + "d", 0, maxCount);
    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

Examples of jdumper.ui.graph.PieGraph

    dim=table.getMinimumSize();
    dim.height+=25;
    tablePane.setPreferredSize(dim);
   
    if(staker.getLabels().length>1){
      pieGraph=new PieGraph(staker.getLabels(),staker.getValues(0));
      JSplitPane splitPane=new JSplitPane(JSplitPane.VERTICAL_SPLIT);
      splitPane.setTopComponent(tablePane);
      splitPane.setBottomComponent(pieGraph);
     
      getContentPane().add(splitPane);
View Full Code Here

Examples of org.ff4j.audit.graph.PieGraph

    }
   
    /** {@inheritDoc} */
    @Override
    public PieGraph getTotalHitsPie(long startTime, long endTime) {
        PieGraph pieGraph = new PieGraph("Total Hits Count");
        List < String > colors   = Util.getColorsGradient(mapOfEvents.size());
        List < String > features = new ArrayList<String>(mapOfEvents.keySet());
        for(int idx = 0; idx < mapOfEvents.size();idx++) {
            Queue< Event > qEvents = mapOfEvents.get(features.get(idx));
            int counter = 0;
            for (Event evt : qEvents) {
                if (evt.getTimestamp() > startTime && evt.getTimestamp() < endTime) {
                    if (EventType.HIT_FLIPPED.equals(evt.getType())) {
                        counter++;
                    }
                }
            }
            pieGraph.getSectors().add(new PieSector(features.get(idx), counter, colors.get(idx)));
        }
        return pieGraph;
    }
View Full Code Here

Examples of org.ff4j.audit.graph.PieGraph

    /** {@inheritDoc} */
    @Override
    public PieGraph getFeatureHitsPie(String featureId, long startTime, long endTime) {
        List < String > colors   = Util.getColorsGradient(4);
        Queue< Event > qEvents = mapOfEvents.get(featureId);
        PieGraph pieGraph = new PieGraph("Hits Count for " + featureId);
        int nbEnable = 0;
        int nbDisable = 0;
        int nbFlip = 0;
        int notFlip = 0;
        if (null != qEvents) {
            for (Event evt : qEvents) {
                if (evt.getTimestamp() > startTime && evt.getTimestamp() < endTime) {
                    switch (evt.getType()) {
                        case HIT_FLIPPED:
                            nbFlip++;
                        break;
                        case HIT_NOT_FLIPPED:
                            notFlip++;
                        break;
                        case ENABLE:
                            nbEnable++;
                        break;
                        case DISABLE:
                            nbDisable++;
                        default:
                        break;
                    }
                }
            }
        }
        pieGraph.getSectors().add(new PieSector("ENABLE", nbEnable, colors.get(0)));
        pieGraph.getSectors().add(new PieSector("DISABLE", nbDisable, colors.get(1)));
        pieGraph.getSectors().add(new PieSector("FLIP", nbFlip, colors.get(2)));
        pieGraph.getSectors().add(new PieSector("NOT_FLIP", notFlip, colors.get(3)));
        return pieGraph;
    }
View Full Code Here

Examples of org.ff4j.audit.graph.PieGraph

        // Create Today PIE
        Calendar c = Calendar.getInstance();
        c.set(Calendar.HOUR_OF_DAY, 0);
        c.set(Calendar.MINUTE, 0);
        c.set(Calendar.SECOND, 0);
        PieGraph pie = getTotalHitsPie(c.getTimeInMillis(), System.currentTimeMillis());
        sb.append(",\"todayHitsPie\": " + pie);
       
        // Create today curve
        Curve curve = getTotalHitsCurve(c.getTimeInMillis(), System.currentTimeMillis(), 100);
        sb.append(",\"todayHitsCurve\": " + curve);
       
        int total = 0;
        for(PieSector sector : pie.getSectors()) {
            total += sector.getValue();
        }
        sb.append(",\"todayHitTotal\":" + total);
        sb.append("}");
        return sb.toString();
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.