Package com.yammer.metrics.stats

Examples of com.yammer.metrics.stats.Snapshot


    @Override
    public void processTimer(final MetricName name, final Timer timer,
            final PrintStream stream) {
        processMeter(name, timer, stream);
        final String durationUnit = abbrev(timer.durationUnit());
        final Snapshot snapshot = timer.getSnapshot();
        stream.printf(locale, "               min = %,2.2f %s\n", timer.min(),
                durationUnit);
        stream.printf(locale, "               max = %,2.2f %s\n", timer.max(),
                durationUnit);
        stream.printf(locale, "              mean = %,2.2f %s\n", timer.mean(),
                durationUnit);
        stream.printf(locale, "            stddev = %,2.2f %s\n",
                timer.stdDev(), durationUnit);
        stream.printf(locale, "            median = %,2.2f %s\n",
                snapshot.getMedian(), durationUnit);
        stream.printf(locale, "              75%% <= %,2.2f %s\n",
                snapshot.get75thPercentile(), durationUnit);
        stream.printf(locale, "              95%% <= %,2.2f %s\n",
                snapshot.get95thPercentile(), durationUnit);
        stream.printf(locale, "              98%% <= %,2.2f %s\n",
                snapshot.get98thPercentile(), durationUnit);
        stream.printf(locale, "              99%% <= %,2.2f %s\n",
                snapshot.get99thPercentile(), durationUnit);
        stream.printf(locale, "            99.9%% <= %,2.2f %s\n",
                snapshot.get999thPercentile(), durationUnit);
    }
View Full Code Here


    }

    public void processHistogram(MetricName name, Histogram histogram, Context context) {
        final String header = "# time,min,max,mean,median,stddev,95%,99%,99.9%";
        final Producer producer = context.getProducer();
        final Snapshot snapshot = histogram.getSnapshot();
        final String topic="%s-metrics-histogram".format(prefix);
        final String message = valueOf(histogram.min()) + ',' + histogram.max() + ',' + histogram.mean() + ','
                + snapshot.getMedian() + ',' + histogram.stdDev() + ',' + snapshot.get95thPercentile() + ',' + snapshot.get99thPercentile() + ','
                + snapshot.get999thPercentile();
        send(producer, header, topic, message);
    }
View Full Code Here

    }

    public void processTimer(MetricName name, Timer timer, Context context) {
        final String header = "# time,min,max,mean,median,stddev,95%,99%,99.9%";
        final Producer producer = context.getProducer();
        final Snapshot snapshot = timer.getSnapshot();
        final String topic="%s-metrics-timer".format(prefix);
        final String  message = valueOf(timer.min()) + ',' + timer.max() + ',' + timer.mean() + ',' + snapshot.getMedian() + ','
                + timer.stdDev() + ',' + snapshot.get95thPercentile() + ',' + snapshot.get99thPercentile() + ',' + snapshot.get999thPercentile();
        send(producer, header, topic, message);
    }
View Full Code Here

TOP

Related Classes of com.yammer.metrics.stats.Snapshot

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.