本文整理匯總了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;
}
示例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();
}
示例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]);
}
}
示例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");
}
}