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

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

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

Histogram.setAutoResize介绍

暂无

代码示例

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

/**
 * Construct an auto-resizing histogram with a lowest discernible value of 1 and an auto-adjusting
 * highestTrackableValue. Can auto-resize up to track values up to (Long.MAX_VALUE / 2).
 *
 * @param numberOfSignificantValueDigits Specifies the precision to use. This is the number of significant
 *                                       decimal digits to which the histogram will maintain value resolution
 *                                       and separation. Must be a non-negative integer between 0 and 5.
 */
public Histogram(final int numberOfSignificantValueDigits) {
  this(1, 2, numberOfSignificantValueDigits);
  setAutoResize(true);
}

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

@Override
public synchronized void setAutoResize(boolean autoResize) {
  super.setAutoResize(autoResize);
}

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

/**
 * (From the Constructor of Histogram)
 * Construct a Histogram given the Lowest and Highest values to be tracked and a number of significant
 * decimal digits. Providing a lowestDiscernibleValue is useful is situations where the units used
 * for the histogram's values are much smaller that the minimal accuracy required. E.g. when tracking
 * time values stated in nanosecond units, where the minimal accuracy required is a microsecond, the
 * proper value for lowestDiscernibleValue would be 1000.
 *
 * @param lowestDiscernibleValue         The lowest value that can be discerned (distinguished from 0) by the
 *                                       histogram. Must be a positive integer that is {@literal >=} 1. May be
 *                                       internally rounded down to nearest power of 2
 *                                       (if null 1 is used).
 * @param highestTrackableValue          The highest value to be tracked by the histogram. Must be a positive
 *                                       integer that is {@literal >=} (2 * lowestDiscernibleValue).
 *                                       (if null 2 * lowestDiscernibleValue is used and auto-resize is enabled)
 * @param numberOfSignificantValueDigits Specifies the precision to use. This is the number of significant
 *                                       decimal digits to which the histogram will maintain value resolution
 *                                       and separation. Must be a non-negative integer between 0 and 5.
 */
public HistogramMetric(Long lowestDiscernibleValue, Long highestTrackableValue,
         final int numberOfSignificantValueDigits) {
  boolean autoResize = false;
  if (lowestDiscernibleValue == null) lowestDiscernibleValue = 1L;
  if (highestTrackableValue == null) {
    highestTrackableValue = 2 * lowestDiscernibleValue;
    autoResize = true;
  }
  _histo = new Histogram(lowestDiscernibleValue, highestTrackableValue, numberOfSignificantValueDigits);
  if (autoResize) _histo.setAutoResize(true);
}

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

((Histogram) intervalHistogram).copy();
accumulatedRegularHistogram.reset();
accumulatedRegularHistogram.setAutoResize(true);

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

@EnsuresNonNull("histogram")
private void convertValuesToHistogram() {
  // tracking nanoseconds, but only at microsecond precision (to save histogram space)
  histogram = new Histogram(1000, 2000, HISTOGRAM_SIGNIFICANT_DIGITS);
  histogram.setAutoResize(true);
  for (int i = 0; i < size; i++) {
    histogram.recordValue(values[i]);
  }
  values = new long[0];
}

代码示例来源:origin: locationtech/geowave

public LocalInternalHistogram(
  final long highestTrackableValue,
  final int numberOfSignificantValueDigits) {
 super(highestTrackableValue, numberOfSignificantValueDigits);
 super.setAutoResize(true);
}

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

/**
 * Construct an auto-resizing histogram with a lowest discernible value of 1 and an auto-adjusting
 * highestTrackableValue. Can auto-resize up to track values up to (Long.MAX_VALUE / 2).
 *
 * @param numberOfSignificantValueDigits Specifies the precision to use. This is the number of significant
 *                                       decimal digits to which the histogram will maintain value resolution
 *                                       and separation. Must be a non-negative integer between 0 and 5.
 */
public Histogram(final int numberOfSignificantValueDigits) {
  this(1, 2, numberOfSignificantValueDigits);
  setAutoResize(true);
}

代码示例来源:origin: locationtech/geowave

public LocalInternalHistogram(
   final long lowestDiscernibleValue,
   final long highestTrackableValue,
   final int numberOfSignificantValueDigits) {
  super(lowestDiscernibleValue, highestTrackableValue, numberOfSignificantValueDigits);
  super.setAutoResize(true);
 }
}

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

@Override
public synchronized void setAutoResize(boolean autoResize) {
  super.setAutoResize(autoResize);
}

代码示例来源:origin: locationtech/geowave

public LocalInternalHistogram(final int numberOfSignificantValueDigits) {
 super(numberOfSignificantValueDigits);
 super.setAutoResize(true);
}

代码示例来源:origin: HotelsDotCom/styx

public IntervalBucket(Histogram aggregateHistogram, long lowestDiscernibleValue, long highestTrackableValue, int numberOfSignificantDigits, Boolean autoResize) {
  this.aggregateHistogram = aggregateHistogram;
  this.intervalHistogram = new Histogram(lowestDiscernibleValue, highestTrackableValue, numberOfSignificantDigits);
  if (autoResize) {
    this.intervalHistogram.setAutoResize(true);
  }
  this.state = IntervalState.EMPTY;
}

代码示例来源:origin: com.hotels.styx/styx-api

public IntervalBucket(Histogram aggregateHistogram, long lowestDiscernibleValue, long highestTrackableValue, int numberOfSignificantDigits, Boolean autoResize) {
  this.aggregateHistogram = aggregateHistogram;
  this.intervalHistogram = new Histogram(lowestDiscernibleValue, highestTrackableValue, numberOfSignificantDigits);
  if (autoResize) {
    this.intervalHistogram.setAutoResize(true);
  }
  this.state = IntervalState.EMPTY;
}

代码示例来源:origin: locationtech/geowave

public LocalInternalHistogram(final AbstractHistogram source) {
 super(source);
 source.setAutoResize(true);
 super.setAutoResize(true);
}

代码示例来源:origin: HotelsDotCom/styx

private SlidingWindowHistogram(Builder builder) {
  this.numberOfIntervals = builder.numberOfIntervals;
  this.intervalDurationMillis = builder.intervalDurationMillis;
  this.clock = builder.clock;
  this.aggregateHistogram = new Histogram(builder.lowestDiscernibleValue, builder.highestTrackableValue, builder.numberOfSignificantDigits);
  if (builder.autoResize) {
    this.aggregateHistogram.setAutoResize(true);
  }
  this.window = new IntervalBucket[this.numberOfIntervals];
  for (int i = 0; i < this.numberOfIntervals; i++) {
    this.window[i] = new IntervalBucket(this.aggregateHistogram, builder.lowestDiscernibleValue,
        builder.highestTrackableValue, builder.numberOfSignificantDigits, builder.autoResize);
  }
  this.lastUpdateTime = currentTimeMillis();
}

代码示例来源:origin: com.hotels.styx/styx-api

private SlidingWindowHistogram(Builder builder) {
  this.numberOfIntervals = builder.numberOfIntervals;
  this.intervalDurationMillis = builder.intervalDurationMillis;
  this.clock = builder.clock;
  this.aggregateHistogram = new Histogram(builder.lowestDiscernibleValue, builder.highestTrackableValue, builder.numberOfSignificantDigits);
  if (builder.autoResize) {
    this.aggregateHistogram.setAutoResize(true);
  }
  this.window = new IntervalBucket[this.numberOfIntervals];
  for (int i = 0; i < this.numberOfIntervals; i++) {
    this.window[i] = new IntervalBucket(this.aggregateHistogram, builder.lowestDiscernibleValue,
        builder.highestTrackableValue, builder.numberOfSignificantDigits, builder.autoResize);
  }
  this.lastUpdateTime = currentTimeMillis();
}

代码示例来源:origin: com.hazelcast.simulator/simulator

accumulatedRegularHistogram = ((Histogram) intervalHistogram).copy();
accumulatedRegularHistogram.reset();
accumulatedRegularHistogram.setAutoResize(true);

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

((Histogram) intervalHistogram).copy();
accumulatedRegularHistogram.reset();
accumulatedRegularHistogram.setAutoResize(true);

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

private HdrHistogramServoTimer(String label) {
  histogram.setAutoResize(true);
  min = new HdrHistogramMinGauge(MonitorConfig.builder(label + "_min").build(), histogram);
  max = new HdrHistogramMaxGauge(MonitorConfig.builder(label + "_max").build(), histogram);
  p50 = new HdrHistogramGauge(MonitorConfig.builder(label + "_p50").build(), histogram, 50);
  p90 = new HdrHistogramGauge(MonitorConfig.builder(label + "_p90").build(), histogram, 90);
  p99 = new HdrHistogramGauge(MonitorConfig.builder(label + "_p99").build(), histogram, 99);
  p99_9 = new HdrHistogramGauge(MonitorConfig.builder(label + "_p99_9").build(), histogram, 99.9);
  p99_99 = new HdrHistogramGauge(MonitorConfig.builder(label + "_p99_99").build(), histogram, 99.99);
}

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

private HdrHistogramServoTimer(String label, List<Tag> tags) {
  histogram.setAutoResize(true);
  min = new HdrHistogramMinGauge(MonitorConfig.builder(label + "_min").withTags(tags).build(), histogram);
  max = new HdrHistogramMaxGauge(MonitorConfig.builder(label + "_max").withTags(tags).build(), histogram);
  p50 = new HdrHistogramGauge(MonitorConfig.builder(label + "_p50").withTags(tags).build(), histogram, 50);
  p90 = new HdrHistogramGauge(MonitorConfig.builder(label + "_p90").withTags(tags).build(), histogram, 90);
  p99 = new HdrHistogramGauge(MonitorConfig.builder(label + "_p99").withTags(tags).build(), histogram, 99);
  p99_9 = new HdrHistogramGauge(MonitorConfig.builder(label + "_p99_9").withTags(tags).build(), histogram, 99.9);
  p99_99 = new HdrHistogramGauge(MonitorConfig.builder(label + "_p99_99").withTags(tags).build(), histogram, 99.99);
}

相关文章