org.HdrHistogram.Recorder.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(7.7k)|赞(0)|评价(0)|浏览(98)

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

Recorder.<init>介绍

暂无

代码示例

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

/**
 * Create a reservoir with a default recorder. This recorder should be suitable for most usage.
 */
public HdrHistogramResetOnSnapshotReservoir() {
  this(new Recorder(2));
}

代码示例来源:origin: linkedin/parseq

private void initializeRecorder() {
 if (_recorder == null) {
  _recorder = new Recorder(LOWEST_DISCERNIBLE_VALUE, HIGHEST_TRACKABLE_VALUE, NUMBER_OF_FIGNIFICANT_VALUE_DIGITS);
 }
}

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

/**
 * Create a reservoir with a default recorder. This recorder should be suitable for most usage.
 */
public HdrHistogramReservoir() {
  this(new Recorder(2));
}

代码示例来源:origin: linkedin/parseq

private void initializeRecorder() {
 if (_recorder == null) {
  _recorder = new Recorder(LOWEST_DISCERNIBLE_VALUE, HIGHEST_TRACKABLE_VALUE, NUMBER_OF_FIGNIFICANT_VALUE_DIGITS);
 }
}

代码示例来源:origin: brianfrankcooper/YCSB

public OneMeasurementHdrHistogram(String name, Properties props) {
 super(name);
 percentiles = getPercentileValues(props.getProperty(PERCENTILES_PROPERTY, PERCENTILES_PROPERTY_DEFAULT));
 verbose = Boolean.valueOf(props.getProperty(VERBOSE_PROPERTY, String.valueOf(false)));
 boolean shouldLog = Boolean.parseBoolean(props.getProperty("hdrhistogram.fileoutput", "false"));
 if (!shouldLog) {
  log = null;
  histogramLogWriter = null;
 } else {
  try {
   final String hdrOutputFilename = props.getProperty("hdrhistogram.output.path", "") + name + ".hdr";
   log = new PrintStream(new FileOutputStream(hdrOutputFilename), false);
  } catch (FileNotFoundException e) {
   throw new RuntimeException("Failed to open hdr histogram output file", e);
  }
  histogramLogWriter = new HistogramLogWriter(log);
  histogramLogWriter.outputComment("[Logging for: " + name + "]");
  histogramLogWriter.outputLogFormatVersion();
  long now = System.currentTimeMillis();
  histogramLogWriter.outputStartTime(now);
  histogramLogWriter.setBaseTime(now);
  histogramLogWriter.outputLegend();
 }
 histogram = new Recorder(3);
}

代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core

private Recorder getRecorder(Host host, Statement statement, Exception exception) {
 Object key = computeKey(host, statement, exception);
 if (key == null) return null;
 Recorder recorder = recorders.get(key);
 if (recorder == null) {
  recorder = new Recorder(highestTrackableLatencyMillis, numberOfSignificantValueDigits);
  Recorder old = recorders.putIfAbsent(key, recorder);
  if (old != null) {
   // We got beaten at creating the recorder, use the actual instance and discard ours
   recorder = old;
  } else {
   // Also set an empty cache entry to remember the time we started recording:
   cachedHistograms.putIfAbsent(key, CachedHistogram.empty());
  }
 }
 return recorder;
}

代码示例来源:origin: rsocket/rsocket-java

public Recorder startTracker(Duration interval) {
 final Recorder histogram = new Recorder(3600000000000L, 3);
 Flux.interval(interval)
   .doOnNext(
     aLong -> {
      System.out.println("---- PING/ PONG HISTO ----");
      histogram
        .getIntervalHistogram()
        .outputPercentileDistribution(System.out, 5, 1000.0, false);
      System.out.println("---- PING/ PONG HISTO ----");
     })
   .subscribe();
 return histogram;
}

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

/**
 * Create a reservoir with a default recorder. This recorder should be suitable for most usage.
 */
public HdrHistogramResetOnSnapshotReservoir() {
  this(new Recorder(2));
}

代码示例来源:origin: com.networknt/metrics

/**
 * Create a reservoir with a default recorder. This recorder should be suitable for most usage.
 */
public HdrHistogramResetOnSnapshotReservoir() {
  this(new Recorder(2));
}

代码示例来源:origin: com.linkedin.parseq/parseq-batching

private void initializeRecorder() {
 if (_recorder == null) {
  _recorder = new Recorder(LOWEST_DISCERNIBLE_VALUE, HIGHEST_TRACKABLE_VALUE, NUMBER_OF_FIGNIFICANT_VALUE_DIGITS);
 }
}

代码示例来源:origin: com.networknt/metrics

/**
 * Create a reservoir with a default recorder. This recorder should be suitable for most usage.
 */
public HdrHistogramReservoir() {
  this(new Recorder(2));
}

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

/**
 * Create a reservoir with a default recorder. This recorder should be suitable for most usage.
 */
public HdrHistogramReservoir() {
  this(new Recorder(2));
}

代码示例来源:origin: com.linkedin.parseq/parseq-batching

private void initializeRecorder() {
 if (_recorder == null) {
  _recorder = new Recorder(LOWEST_DISCERNIBLE_VALUE, HIGHEST_TRACKABLE_VALUE, NUMBER_OF_FIGNIFICANT_VALUE_DIGITS);
 }
}

代码示例来源:origin: com.palantir.tritium/tritium-metrics

private static Supplier<Recorder> twoSignificantDigits() {
  return () -> new Recorder(2);
}

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

private Recorder buildRecorder() {
  if (lowestDiscernibleValue.isPresent()) {
    return new Recorder(lowestDiscernibleValue.get(), highestTrackableValue.get(), numberOfSignificantValueDigits);
  }
  if (highestTrackableValue.isPresent()) {
    return new Recorder(highestTrackableValue.get(), numberOfSignificantValueDigits);
  }
  return new Recorder(numberOfSignificantValueDigits);
}

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

private Recorder buildRecorder() {
  if (lowestDiscernibleValue.isPresent()) {
    return new Recorder(lowestDiscernibleValue.get(), highestTrackableValue.get(), numberOfSignificantValueDigits);
  }
  if (highestTrackableValue.isPresent()) {
    return new Recorder(highestTrackableValue.get(), numberOfSignificantValueDigits);
  }
  return new Recorder(numberOfSignificantValueDigits);
}

代码示例来源:origin: org.attribyte/essem-reporter

/**
* Creates a HDR histogram.
* @param numberOfSignificantValueDigits The number of significant digits in the value.
* @param reportTotalHistogram If {@code true}, the long-running histogram will be reported. Otherwise, the histogram
* collected since the last snapshot was acquired will be reported.
*/
public HDRReservoir(final int numberOfSignificantValueDigits, final boolean reportTotalHistogram) {
 this.highestTrackableValue = Long.MAX_VALUE;
 this.recorder = new Recorder(numberOfSignificantValueDigits);
 this.totalHistogram = new Histogram(numberOfSignificantValueDigits);
 this.reportTotalHistogram = reportTotalHistogram;
}

代码示例来源:origin: org.attribyte/essem-reporter

/**
* Creates a HDR histogram.
* @param highestTrackableValue The highest value tracked. Anything larger will be set to the maximum.
* @param numberOfSignificantValueDigits The number of significant digits in the value.
* @param reportTotalHistogram If {@code true}, the long-running histogram will be reported. Otherwise, the histogram
* collected since the last snapshot was acquired will be reported.
*/
public HDRReservoir(final long highestTrackableValue, final int numberOfSignificantValueDigits,
          final boolean reportTotalHistogram) {
 this.highestTrackableValue = highestTrackableValue;
 this.recorder = new Recorder(highestTrackableValue, numberOfSignificantValueDigits);
 this.totalHistogram = new Histogram(highestTrackableValue, numberOfSignificantValueDigits);
 this.reportTotalHistogram = reportTotalHistogram;
}

代码示例来源:origin: com.yugabyte/cassandra-driver-core

private Recorder getRecorder(Host host, Statement statement, Exception exception) {
  Object key = computeKey(host, statement, exception);
  if (key == null)
    return null;
  Recorder recorder = recorders.get(key);
  if (recorder == null) {
    recorder = new Recorder(highestTrackableLatencyMillis, numberOfSignificantValueDigits);
    Recorder old = recorders.putIfAbsent(key, recorder);
    if (old != null) {
      // We got beaten at creating the recorder, use the actual instance and discard ours
      recorder = old;
    } else {
      // Also set an empty cache entry to remember the time we started recording:
      cachedHistograms.putIfAbsent(key, CachedHistogram.empty());
    }
  }
  return recorder;
}

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

public Recorder startTracker(Duration interval) {
  final Recorder histogram = new Recorder(3600000000000L, 3);
  Flux.interval(interval)
      .doOnNext(aLong -> {
      System.out.println("---- PING/ PONG HISTO ----");
      histogram.getIntervalHistogram()
        .outputPercentileDistribution(System.out, 5, 1000.0, false);
      System.out.println("---- PING/ PONG HISTO ----");
    })
      .subscribe();
  return histogram;
}

相关文章