當前位置: 首頁>>代碼示例>>Java>>正文


Java Snapshot.get99thPercentile方法代碼示例

本文整理匯總了Java中com.yammer.metrics.stats.Snapshot.get99thPercentile方法的典型用法代碼示例。如果您正苦於以下問題:Java Snapshot.get99thPercentile方法的具體用法?Java Snapshot.get99thPercentile怎麽用?Java Snapshot.get99thPercentile使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.yammer.metrics.stats.Snapshot的用法示例。


在下文中一共展示了Snapshot.get99thPercentile方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: LatencyMetric

import com.yammer.metrics.stats.Snapshot; //導入方法依賴的package包/類
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;
}
 
開發者ID:Hanmourang,項目名稱:Pinot,代碼行數:17,代碼來源:LatencyMetric.java

示例2: toString

import com.yammer.metrics.stats.Snapshot; //導入方法依賴的package包/類
@Override
public String toString() {
  Snapshot snapshot = this.age.getSnapshot();
  return "count=" + count + ", dataBlockCount=" + this.dataBlockCount + ", size=" + size +
      ", dataSize=" + getDataSize() +
      ", mean age=" + this.age.mean() + ", stddev age=" + this.age.stdDev() +
      ", min age=" + this.age.min() + ", max age=" + this.age.max() +
      ", 95th percentile age=" + snapshot.get95thPercentile() +
      ", 99th percentile age=" + snapshot.get99thPercentile();
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:11,代碼來源:BlockCacheUtil.java

示例3: send

import com.yammer.metrics.stats.Snapshot; //導入方法依賴的package包/類
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]);
  }
}
 
開發者ID:airbnb,項目名稱:kafka-statsd-metrics2,代碼行數:9,代碼來源:StatsDReporter.java

示例4: getNumber

import com.yammer.metrics.stats.Snapshot; //導入方法依賴的package包/類
public Number getNumber(final Metric metric, final Snapshot snapshot) {
  if (metric instanceof Histogram) {
    Histogram histogram = (Histogram) metric;
    switch(this) {
      case COUNT:
        return histogram.count();
      case MAX:
        return histogram.max();
      case MIN:
        return histogram.min();
      case MEAN:
        return histogram.mean();
      case SUM:
        return histogram.sum();
      case STD_DEV:
        return histogram.stdDev();
      case MEDIAN:
        return snapshot.getMedian();
      case PERCENTILE75:
        return snapshot.get75thPercentile();
      case PERCENTILE95:
        return snapshot.get95thPercentile();
      case PERCENTILE98:
        return snapshot.get98thPercentile();
      case PERCENTILE99:
        return snapshot.get99thPercentile();
      case PERCENTILE999:
        return snapshot.get999thPercentile();
      default:
        throw new RuntimeException("Unexpected property");
    }
  } else {
    throw new IllegalArgumentException("Invalid metric for property");
  }
}
 
開發者ID:spotify,項目名稱:metrics-munin-reporter,代碼行數:36,代碼來源:Property.java


注:本文中的com.yammer.metrics.stats.Snapshot.get99thPercentile方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。