org.HdrHistogram.Histogram.logarithmicBucketValues()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(88)

本文整理了Java中org.HdrHistogram.Histogram.logarithmicBucketValues()方法的一些代码示例,展示了Histogram.logarithmicBucketValues()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Histogram.logarithmicBucketValues()方法的具体详情如下:
包路径:org.HdrHistogram.Histogram
类名称:Histogram
方法名:logarithmicBucketValues

Histogram.logarithmicBucketValues介绍

暂无

代码示例

代码示例来源:origin: HdrHistogram/HdrHistogram

@Override
public synchronized LogarithmicBucketValues logarithmicBucketValues(final long valueUnitsInFirstBucket, final double logBase) {
  return super.logarithmicBucketValues(valueUnitsInFirstBucket, logBase);
}

代码示例来源:origin: org.hdrhistogram/HdrHistogram

@Override
public synchronized LogarithmicBucketValues logarithmicBucketValues(final long valueUnitsInFirstBucket, final double logBase) {
  return super.logarithmicBucketValues(valueUnitsInFirstBucket, logBase);
}

代码示例来源:origin: airlift/airlift

@Managed(description = "Per-bucket counts")
public Map<Double, Long> getCounts()
{
  Map<Double, Long> result = new TreeMap<>();
  for (HistogramIterationValue entry : snapshot.get().logarithmicBucketValues(TimeUnit.MILLISECONDS.toNanos(1), 2)) {
    double median = (entry.getValueIteratedTo() + entry.getValueIteratedFrom()) / 2.0;
    result.put(round(median / (double) TimeUnit.MILLISECONDS.toNanos(1), 2), entry.getCountAddedInThisIterationStep());
  }
  return result;
}

代码示例来源:origin: io.airlift/stats

@Managed(description = "Per-bucket counts")
public Map<Double, Long> getCounts()
{
  Map<Double, Long> result = new TreeMap<>();
  for (HistogramIterationValue entry : snapshot.get().logarithmicBucketValues(TimeUnit.MILLISECONDS.toNanos(1), 2)) {
    double median = (entry.getValueIteratedTo() + entry.getValueIteratedFrom()) / 2.0;
    result.put(round(median / (double) TimeUnit.MILLISECONDS.toNanos(1), 2), entry.getCountAddedInThisIterationStep());
  }
  return result;
}

代码示例来源:origin: io.airlift/stats

@Managed(description = "Per-bucket total pause time in s")
public Map<Double, Double> getSums()
{
  long previous = 0;
  Map<Double, Double> result = new TreeMap<>();
  for (HistogramIterationValue entry : snapshot.get().logarithmicBucketValues(TimeUnit.MILLISECONDS.toNanos(1), 2)) {
    double median = (entry.getValueIteratedTo() + entry.getValueIteratedFrom()) / 2.0;
    long current = entry.getTotalValueToThisValue();
    result.put(round(median / TimeUnit.MILLISECONDS.toNanos(1), 2), round((current - previous) * 1.0 / TimeUnit.SECONDS.toNanos(1), 2));
    previous = current;
  }
  return result;
}

代码示例来源:origin: airlift/airlift

@Managed(description = "Per-bucket total pause time in s")
public Map<Double, Double> getSums()
{
  long previous = 0;
  Map<Double, Double> result = new TreeMap<>();
  for (HistogramIterationValue entry : snapshot.get().logarithmicBucketValues(TimeUnit.MILLISECONDS.toNanos(1), 2)) {
    double median = (entry.getValueIteratedTo() + entry.getValueIteratedFrom()) / 2.0;
    long current = entry.getTotalValueToThisValue();
    result.put(round(median / TimeUnit.MILLISECONDS.toNanos(1), 2), round((current - previous) * 1.0 / TimeUnit.SECONDS.toNanos(1), 2));
    previous = current;
  }
  return result;
}

相关文章