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

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

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

Histogram.getMaxValue介绍

暂无

代码示例

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

@Override
public synchronized long getMaxValue() {
  return super.getMaxValue();
}

代码示例来源:origin: networknt/light-4j

@Override
public long getMax() {
  return histogram.getMaxValue();
}

代码示例来源:origin: apache/storm

public double getMaxLatency(TimeUnit unit) {
  return convert(histo.getMaxValue(), TimeUnit.NANOSECONDS, unit);
}

代码示例来源:origin: lettuce-io/lettuce-core

private CommandLatency getMetric(Histogram histogram) {
  Map<Double, Long> percentiles = getPercentiles(histogram);
  TimeUnit timeUnit = options.targetUnit();
  return new CommandLatency(timeUnit.convert(histogram.getMinValue(), TimeUnit.NANOSECONDS), timeUnit.convert(
      histogram.getMaxValue(), TimeUnit.NANOSECONDS), percentiles);
}

代码示例来源: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: HdrHistogram/HdrHistogram

((Histogram) intervalHistogram).getValueAtPercentile(50.0) / config.outputValueUnitRatio,
    ((Histogram) intervalHistogram).getValueAtPercentile(90.0) / config.outputValueUnitRatio,
    ((Histogram) intervalHistogram).getMaxValue() / config.outputValueUnitRatio,
    accumulatedRegularHistogram.getValueAtPercentile(99.9) / config.outputValueUnitRatio,
    accumulatedRegularHistogram.getValueAtPercentile(99.99) / config.outputValueUnitRatio,
    accumulatedRegularHistogram.getMaxValue() / config.outputValueUnitRatio
);
    ((Histogram) movingWindowSumHistogram).getMaxValue() / config.outputValueUnitRatio
);

代码示例来源: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: 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: neo4j-contrib/neo4j-apoc-procedures

public static DoubleHistogram toDoubleHistogram(Histogram source, int numberOfSignificantValueDigits) {
    DoubleHistogram doubles = new DoubleHistogram(numberOfSignificantValueDigits);
    // Do max value first, to avoid max value updates on each iteration:
    int otherMaxIndex = source.countsArrayIndex(source.getMaxValue());
    long count = source.getCountAtIndex(otherMaxIndex);
    doubles.recordValueWithCount(source.valueFromIndex(otherMaxIndex), count);

    // Record the remaining values, up to but not including the max value:
    for (int i = 0; i < otherMaxIndex; i++) {
      count = source.getCountAtIndex(i);
      if (count > 0) {
        doubles.recordValueWithCount(source.valueFromIndex(i), count);
      }
    }
    return doubles;
  }
}

代码示例来源:origin: org.mpierce.metrics.reservoir/hdrhistogram-metrics-reservoir

@Override
public long getMax() {
  return histogram.getMaxValue();
}

代码示例来源:origin: com.github.vladimir-bukhtoyarov/rolling-metrics

@Override
public long getMax() {
  return histogram.getMaxValue();
}

代码示例来源:origin: io.reactivesocket/reactivesocket-stats-servo

@Override
  public Long getValue() {
    return histogram.getMaxValue();
  }
}

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

@Override
public synchronized long getMaxValue() {
  return super.getMaxValue();
}

代码示例来源:origin: io.engineblock/eb-api

@Override
public long getMax() {
  return histogram.getMaxValue();
}

代码示例来源:origin: com.datastax.oss/java-driver-core-shaded

@Override
public long getMax() {
 return histogram.getMaxValue() * 1000;
}

代码示例来源:origin: mzheravin/exchange-core

public static Map<String, String> createLatencyReportFast(Histogram histogram) {
  Map<String, String> fmt = new LinkedHashMap<>();
  Arrays.stream(PERCENTILES).forEach(p -> {
    String formattedValue = formatLatencyValueAsTime((int) histogram.getValueAtPercentile(p));
    fmt.put(p + "%", formattedValue);
  });
  fmt.put("W", formatLatencyValueAsTime((int) histogram.getMaxValue()));
  return fmt;
}

代码示例来源:origin: io.lettuce/lettuce-core

private CommandLatency getMetric(Histogram histogram) {
  Map<Double, Long> percentiles = getPercentiles(histogram);
  TimeUnit timeUnit = options.targetUnit();
  return new CommandLatency(timeUnit.convert(histogram.getMinValue(), TimeUnit.NANOSECONDS), timeUnit.convert(
      histogram.getMaxValue(), TimeUnit.NANOSECONDS), percentiles);
}

代码示例来源: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: 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());
}

相关文章