Package com.rackspacecloud.blueflood.types

Examples of com.rackspacecloud.blueflood.types.HistogramRollup


            double mean = in.readDouble();
            Bin<SimpleTarget> bin = new Bin<SimpleTarget>(mean, count, SimpleTarget.TARGET);
            bins.add(bin);
        }

        return new HistogramRollup(bins);
    }
View Full Code Here


        Points<HistogramRollup> points = new Points<HistogramRollup>();
        long startTime = 1234567L;
        for (int i =0; i < 5; i++) {
            long timeNow = startTime + i*1000;
            Points.Point<HistogramRollup> point = new Points.Point<HistogramRollup>(timeNow,
                    new HistogramRollup(getBins()));
            points.add(point);
        }
        return points;
    }
View Full Code Here

        if (!(point.getData() instanceof HistogramRollup)) {
            throw new SerializationException("Unsupported type. HistogramRollup expected.");
        }

        HistogramRollup histogramRollup = (HistogramRollup) point.getData();

        final JSONArray hist = new JSONArray();
        for (Bin<SimpleTarget> bin : histogramRollup.getBins()) {
            final JSONObject obj = new JSONObject();
            obj.put("mean", bin.getMean());
            obj.put("count", bin.getCount());
            hist.add(obj);
        }
View Full Code Here

TOP

Related Classes of com.rackspacecloud.blueflood.types.HistogramRollup

Copyright © 2018 www.massapicom. 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.