Java Code Examples for com.yammer.metrics.stats.Snapshot#get99thPercentile()

The following examples show how to use com.yammer.metrics.stats.Snapshot#get99thPercentile() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LatencyMetric.java    From incubator-pinot with Apache License 2.0 6 votes vote down vote up
public LatencyMetric(T h) {
  Snapshot s = h.getSnapshot();
  _min = h.min();
  _max = h.max();
  _mean = h.mean();
  if (null != s) {
    _percentile95 = s.get95thPercentile();
    _percentile99 = s.get99thPercentile();
    _percentile999 = s.get999thPercentile();
  } else {
    _percentile95 = -1;
    _percentile99 = -1;
    _percentile999 = -1;
  }
  _histogram = h;
}
 
Example 2
Source File: TopicReporter.java    From metrics-kafka with Apache License 2.0 5 votes vote down vote up
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);
}
 
Example 3
Source File: TopicReporter.java    From metrics-kafka with Apache License 2.0 5 votes vote down vote up
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);
}
 
Example 4
Source File: StatsDReporter.java    From kafka-statsd-metrics2 with Apache License 2.0 5 votes vote down vote up
protected void send(Sampling metric) {
  final Snapshot snapshot = metric.getSnapshot();
  double[] values = {snapshot.getMedian(), snapshot.get75thPercentile(), snapshot.get95thPercentile(),
      snapshot.get98thPercentile(), snapshot.get99thPercentile(), snapshot.get999thPercentile()};
  for (int i = 0; i < values.length; ++i) {
    sendDouble(SamplingDims[i], values[i]);
  }
}