Package com.rackspacecloud.blueflood.types

Examples of com.rackspacecloud.blueflood.types.Rollup


        for (Counter c : counters) {
            Locator locator = Locator.createLocatorFromPathComponents(tenantId == null ? c.getTenant() : tenantId, splitForLocator(c.getName()));
            long sampleCount = bundle.getFlushInterval() > 0
                    ? (long)(c.getRate().doubleValue() * ((double)bundle.getFlushInterval()/1000d))
                    : 1;
            Rollup rollup = new CounterRollup()
                    .withCount(c.getValue())
                    .withRate(c.getRate().doubleValue())
                    .withCount(sampleCount);
            PreaggregatedMetric metric = new PreaggregatedMetric(bundle.getCollectionTime(), locator, DEFAULT_PREAG_TTL, rollup);
            metrics.add(metric);
View Full Code Here


        final List<PreaggregatedMetric> metrics = new ArrayList<PreaggregatedMetric>(gauges.size());
        for (Gauge g : gauges) {
            Locator locator = Locator.createLocatorFromPathComponents(tenantId == null ? g.getTenant() : tenantId, splitForLocator(g.getName()));
            Points<SimpleNumber> points = new Points<SimpleNumber>();
            points.add(new Points.Point<SimpleNumber>(bundle.getCollectionTime(), new SimpleNumber(g.getValue())));
            Rollup rollup = GaugeRollup.buildFromRawSamples(points);
            PreaggregatedMetric metric = new PreaggregatedMetric(bundle.getCollectionTime(), locator, DEFAULT_PREAG_TTL, rollup);
            metrics.add(metric);
        }
        return metrics;
    }
View Full Code Here

            Locator locator = Locator.createLocatorFromPathComponents(tenant, counter.getName().split(NAME_DELIMITER, -1));
            // flushIntervalMillis could be zero (if not specified in the statsD config).
            long sampleCount = flushIntervalMillis > 0
                    ? (long)(counter.getRate().doubleValue() * ((double)flushIntervalMillis/1000d))
                    : 1;
            Rollup rollup = new CounterRollup()
                    .withCount(resolveNumber(counter.getValue()))
                    .withRate(counter.getRate().doubleValue())
                    .withCount(sampleCount);
            PreaggregatedMetric metric = new PreaggregatedMetric(timestamp, locator, DEFAULT_TTL, rollup);
            list.add(metric);
View Full Code Here

        for (Bundle.Gauge gauge : gauges) {
            Locator locator = Locator.createLocatorFromPathComponents(tenant, gauge.getName().split(NAME_DELIMITER, -1));
            Points<SimpleNumber> points = new Points<SimpleNumber>();
            points.add(new Points.Point<SimpleNumber>(timestamp, new SimpleNumber(resolveNumber(gauge.getValue()))));
            try {
                Rollup rollup = GaugeRollup.buildFromRawSamples(points);
                PreaggregatedMetric metric = new PreaggregatedMetric(timestamp, locator, DEFAULT_TTL, rollup);
                list.add(metric);
            } catch (IOException ex) {
                throw new IOError(ex);
            }  
View Full Code Here

TOP

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

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.