本文整理了Java中org.HdrHistogram.Histogram.getMean()
方法的一些代码示例,展示了Histogram.getMean()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Histogram.getMean()
方法的具体详情如下:
包路径:org.HdrHistogram.Histogram
类名称:Histogram
方法名:getMean
暂无
代码示例来源:origin: HdrHistogram/HdrHistogram
@Override
public synchronized double getMean() {
return super.getMean();
}
代码示例来源:origin: networknt/light-4j
@Override
public double getMean() {
return histogram.getMean();
}
代码示例来源:origin: apache/storm
public double getMeanLatency(TimeUnit unit) {
return convert(histo.getMean(), TimeUnit.NANOSECONDS, unit);
}
代码示例来源:origin: brianfrankcooper/YCSB
/**
* 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 com.yahoo.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)) + "]";
}
代码示例来源:origin: brianfrankcooper/YCSB
exporter.write(getName(), "AverageLatency(us)", totalHistogram.getMean());
exporter.write(getName(), "MinLatency(us)", totalHistogram.getMinValue());
exporter.write(getName(), "MaxLatency(us)", totalHistogram.getMaxValue());
代码示例来源:origin: PipelineAI/pipeline
mean = (int) underlying.getMean();
p0 = (int) underlying.getValueAtPercentile(0);
p5 = (int) underlying.getValueAtPercentile(5);
代码示例来源:origin: neo4j-contrib/neo4j-apoc-procedures
@UserAggregationResult
public Map<String,Number> result() {
long totalCount = values != null ? values.getTotalCount() : doubles.getTotalCount();
boolean empty = totalCount == 0;
Map<String,Number> result = new LinkedHashMap<>(percentiles.size()+6);
result.put("min",values != null ? (Number)values.getMinValue() : (Number)doubles.getMinValue());
result.put("minNonZero",values != null ? (Number)values.getMinNonZeroValue() : (Number)doubles.getMinNonZeroValue());
result.put("max",values != null ? (Number)values.getMaxValue() : (Number)doubles.getMaxValue());
result.put("total",totalCount);
result.put("mean",values != null ? values.getMean() : doubles.getMean());
result.put("stdev",values != null ? values.getStdDeviation() : doubles.getStdDeviation());
for (Double percentile : percentiles) {
if (percentile != null && !empty) {
if (values != null) {
result.put(percentile.toString(), values.getValueAtPercentile(percentile * 100D));
} else {
result.put(percentile.toString(), doubles.getValueAtPercentile(percentile * 100D));
}
}
}
return result;
}
}
代码示例来源:origin: com.github.vladimir-bukhtoyarov/rolling-metrics
@Override
public double getMean() {
return histogram.getMean();
}
代码示例来源:origin: org.hdrhistogram/HdrHistogram
@Override
public synchronized double getMean() {
return super.getMean();
}
代码示例来源:origin: org.mpierce.metrics.reservoir/hdrhistogram-metrics-reservoir
@Override
public double getMean() {
return histogram.getMean();
}
代码示例来源:origin: com.networknt/metrics
@Override
public double getMean() {
return histogram.getMean();
}
代码示例来源:origin: org.attribyte/essem-reporter
@Override
public double getMean() {
return histogram.getMean();
}
代码示例来源:origin: co.paralleluniverse/quasar-core
@Override
public double getMean() {
return histogram.getMean();
}
代码示例来源:origin: com.datastax.oss/java-driver-core-shaded
private HdrSnapshot(Histogram histogram) {
this.histogram = histogram;
// Cache those values because they rely on HdrHistogram's internal iterators, which are not
// safe if the snapshot is accessed by concurrent reporters.
// In contrast, getMin(), getMax() and getValue() are safe.
this.meanNanos = histogram.getMean() * 1000;
this.stdDevNanos = histogram.getStdDeviation() * 1000;
}
代码示例来源:origin: io.vertx/vertx-circuit-breaker
private void addLatency(JsonObject json, Histogram histogram, String prefix) {
json.put(prefix + "LatencyMean", histogram.getMean());
json.put(prefix + "Latency", new JsonObject()
.put("0", histogram.getValueAtPercentile(0))
.put("25", histogram.getValueAtPercentile(25))
.put("50", histogram.getValueAtPercentile(50))
.put("75", histogram.getValueAtPercentile(75))
.put("90", histogram.getValueAtPercentile(90))
.put("95", histogram.getValueAtPercentile(95))
.put("99", histogram.getValueAtPercentile(99))
.put("99.5", histogram.getValueAtPercentile(99.5))
.put("100", histogram.getValueAtPercentile(100)));
}
代码示例来源:origin: org.apache.pulsar/pulsar-testclient
private static void printAggregatedStats() {
Histogram reportHistogram = cumulativeRecorder.getIntervalHistogram();
log.info(
"Aggregated latency stats --- Latency: mean: {} ms - med: {} - 95pct: {} - 99pct: {} - 99.9pct: {} - 99.99pct: {} - 99.999pct: {} - Max: {}",
dec.format(reportHistogram.getMean() / 1000.0),
dec.format(reportHistogram.getValueAtPercentile(50) / 1000.0),
dec.format(reportHistogram.getValueAtPercentile(95) / 1000.0),
dec.format(reportHistogram.getValueAtPercentile(99) / 1000.0),
dec.format(reportHistogram.getValueAtPercentile(99.9) / 1000.0),
dec.format(reportHistogram.getValueAtPercentile(99.99) / 1000.0),
dec.format(reportHistogram.getValueAtPercentile(99.999) / 1000.0),
dec.format(reportHistogram.getMaxValue() / 1000.0));
}
代码示例来源:origin: org.apache.pulsar/pulsar-testclient
private static void printAggregatedStats() {
Histogram reportHistogram = cumulativeRecorder.getIntervalHistogram();
log.info(
"Aggregated latency stats --- Latency: mean: {} ms - med: {} - 95pct: {} - 99pct: {} - 99.9pct: {} - 99.99pct: {} - 99.999pct: {} - Max: {}",
dec.format(reportHistogram.getMean() / 1000.0),
dec.format(reportHistogram.getValueAtPercentile(50) / 1000.0),
dec.format(reportHistogram.getValueAtPercentile(95) / 1000.0),
dec.format(reportHistogram.getValueAtPercentile(99) / 1000.0),
dec.format(reportHistogram.getValueAtPercentile(99.9) / 1000.0),
dec.format(reportHistogram.getValueAtPercentile(99.99) / 1000.0),
dec.format(reportHistogram.getValueAtPercentile(99.999) / 1000.0),
dec.format(reportHistogram.getMaxValue() / 1000.0));
}
代码示例来源:origin: com.yahoo.pulsar/pulsar-broker
public void updateStats() {
topicLoadHistogram = topicLoadTimeRecorder.getIntervalHistogram(topicLoadHistogram);
this.elapsedIntervalMs = (TimeUnit.NANOSECONDS.toMillis(System.nanoTime()) - topicLoadRecordStartTime);
topicLoadRecordStartTime = TimeUnit.NANOSECONDS.toMillis(System.nanoTime());
this.meanTopicLoadMs = topicLoadHistogram.getMean();
this.medianTopicLoadMs = topicLoadHistogram.getValueAtPercentile(50);
this.topicLoad95Ms = topicLoadHistogram.getValueAtPercentile(95);
this.topicLoad99Ms = topicLoadHistogram.getValueAtPercentile(99);
this.topicLoad999Ms = topicLoadHistogram.getValueAtPercentile(99.9);
this.topicsLoad9999Ms = topicLoadHistogram.getValueAtPercentile(99.99);
this.topicLoadCounts = topicLoadHistogram.getTotalCount();
}
代码示例来源:origin: real-logic/artio
public static void printStats(final Histogram histogram)
{
System.out.printf(
"Max = %d, Mean = %f, 99.9%% = %d%n",
histogram.getMaxValue(),
histogram.getMean(),
histogram.getValueAtPercentile(99.9));
}
}
代码示例来源:origin: org.apache.pulsar/pulsar-testclient
private static void printAggregatedStats() {
Histogram reportHistogram = cumulativeRecorder.getIntervalHistogram();
log.info(
"Aggregated latency stats --- Latency: mean: {} ms - med: {} - 95pct: {} - 99pct: {} - 99.9pct: {} - 99.99pct: {} - 99.999pct: {} - Max: {}",
dec.format(reportHistogram.getMean()), (long) reportHistogram.getValueAtPercentile(50),
(long) reportHistogram.getValueAtPercentile(95), (long) reportHistogram.getValueAtPercentile(99),
(long) reportHistogram.getValueAtPercentile(99.9), (long) reportHistogram.getValueAtPercentile(99.99),
(long) reportHistogram.getValueAtPercentile(99.999), (long) reportHistogram.getMaxValue());
}
内容来源于网络,如有侵权,请联系作者删除!