本文整理匯總了Java中org.HdrHistogram.Histogram.getMaxValue方法的典型用法代碼示例。如果您正苦於以下問題:Java Histogram.getMaxValue方法的具體用法?Java Histogram.getMaxValue怎麽用?Java Histogram.getMaxValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.HdrHistogram.Histogram
的用法示例。
在下文中一共展示了Histogram.getMaxValue方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getSummary
import org.HdrHistogram.Histogram; //導入方法依賴的package包/類
/**
* This is called periodically from the StatusThread. There's a single
* StatusThread per Client process. We optionally serialize the interval to
* log on this opportunity.
*
* @see ditb.ycsb.measurements.OneMeasurement#getSummary()
*/
@Override public String getSummary() {
Histogram intervalHistogram = getIntervalHistogramAndAccumulate();
// we use the summary interval as the histogram file interval.
if (histogramLogWriter != null) {
histogramLogWriter.outputIntervalHistogram(intervalHistogram);
}
DecimalFormat d = new DecimalFormat("#.##");
return "[" + getName() + ": Count=" + intervalHistogram.getTotalCount() + ", Max="
+ intervalHistogram.getMaxValue() + ", Min=" + intervalHistogram.getMinValue() + ", Avg="
+ d.format(intervalHistogram.getMean()) + ", 90=" + d
.format(intervalHistogram.getValueAtPercentile(90)) + ", 99=" + d
.format(intervalHistogram.getValueAtPercentile(99)) + ", 99.9=" + d
.format(intervalHistogram.getValueAtPercentile(99.9)) + ", 99.99=" + d
.format(intervalHistogram.getValueAtPercentile(99.99)) + "]";
}
示例2: takeSmartSnapshot
import org.HdrHistogram.Histogram; //導入方法依賴的package包/類
static Snapshot takeSmartSnapshot(final double[] predefinedQuantiles, Histogram histogram) {
final long max = histogram.getMaxValue();
final long min = histogram.getMinValue();
final double mean = histogram.getMean();
final double median = histogram.getValueAtPercentile(50.0);
final double stdDeviation = histogram.getStdDeviation();
final double[] values = new double[predefinedQuantiles.length];
for (int i = 0; i < predefinedQuantiles.length; i++) {
double quantile = predefinedQuantiles[i];
double percentile = quantile * 100.0;
values[i] = histogram.getValueAtPercentile(percentile);
}
return createSmartSnapshot(predefinedQuantiles, max, min, mean, median, stdDeviation, values);
}