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


Java Snapshot.get75thPercentile方法代碼示例

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


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

示例1: BenchmarkResult

import com.yammer.metrics.stats.Snapshot; //導入方法依賴的package包/類
public BenchmarkResult(int count, long totalTime, Histogram histogram) {
    this.count = count;
    this.totalTime = totalTime;
    this.rate = count / (totalTime * 1.0);
    this.minTime = histogram.min();
    this.maxTime = histogram.max();
    this.meanTime = histogram.mean();
    this.deviation = histogram.stdDev();
    Snapshot snapshot = histogram.getSnapshot();
    this.p75Time = snapshot.get75thPercentile();
    this.p95Time = snapshot.get95thPercentile();
}
 
開發者ID:btnguyen2k,項目名稱:id-jclient,代碼行數:13,代碼來源:BenchmarkResult.java

示例2: 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

示例3: 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.get75thPercentile方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。