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

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

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

Histogram.copy介绍

暂无

代码示例

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

@Override
  public Object getValueAndReset() {
     Histogram copy = _histo.copy();
     _histo.reset();
     return copy;
  }
}

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

/**
   * @return a copy of the accumulated state since the reservoir last had a snapshot
   */
  @Nonnull
  private synchronized Histogram getDataSinceLastSnapshotAndReset() {
    intervalHistogram = recorder.getIntervalHistogram(intervalHistogram);
    return intervalHistogram.copy();
  }
}

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

/**
   * @return a copy of the accumulated state since the reservoir was created
   */
  @Nonnull
  private synchronized Histogram updateRunningTotals() {
    intervalHistogram = recorder.getIntervalHistogram(intervalHistogram);
    runningTotals.add(intervalHistogram);
    return runningTotals.copy();
  }
}

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

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

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

private Histogram makeSnapshot()
{
  synchronized (histogram) {
    return histogram.copy();
  }
}

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

private Histogram makeSnapshot()
{
  synchronized (histogram) {
    return histogram.copy();
  }
}

代码示例来源:origin: jpos/jPOS

public Map<String,Histogram> metrics() {
  return metrics.entrySet()
   .stream()
   .sorted(Map.Entry.comparingByKey())
   .collect(Collectors.toMap(Map.Entry::getKey, e -> e.getValue().copy()));
}

代码示例来源:origin: jpos/jPOS

public Map<String,Histogram> metrics (String prefix) {
  return metrics.entrySet()
   .stream()
   .filter(e -> e.getKey().startsWith(prefix))
   .sorted(Map.Entry.comparingByKey())
   .collect(Collectors.toMap(Map.Entry::getKey, e -> e.getValue().copy()));
}

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

Phase(Supplier<Recorder> recorderSupplier, long proposedInvalidationTimestamp) {
  this.recorder = recorderSupplier.get();
  this.intervalHistogram = recorder.getIntervalHistogram();
  this.totalsHistogram = intervalHistogram.copy();
  this.proposedInvalidationTimestamp = proposedInvalidationTimestamp;
}

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

/**
   * @return a copy of the accumulated state since the reservoir last had a snapshot
   */
  @Nonnull
  private synchronized Histogram getDataSinceLastSnapshotAndReset() {
    intervalHistogram = recorder.getIntervalHistogram(intervalHistogram);
    return intervalHistogram.copy();
  }
}

代码示例来源:origin: co.paralleluniverse/quasar-core

private synchronized Histogram updateRunningTotals() {
    stats.addIntervalHistogramTo(runningTotals);
    return runningTotals.copy();
  }
}

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

/**
   * @return a copy of the accumulated state since the reservoir last had a snapshot
   */
  @Nonnull
  private synchronized Histogram getDataSinceLastSnapshotAndReset() {
    intervalHistogram = recorder.getIntervalHistogram(intervalHistogram);
    return intervalHistogram.copy();
  }
}

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

Phase(Supplier<Recorder> recorderSupplier, long proposedInvalidationTimestamp) {
  this.recorder = recorderSupplier.get();
  this.intervalHistogram = recorder.getIntervalHistogram();
  this.totalsHistogram = intervalHistogram.copy();
  this.proposedInvalidationTimestamp = proposedInvalidationTimestamp;
}

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

public synchronized Histogram copy() {
  return getAggregateHistogram().copy();
}

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

public synchronized Histogram copy() {
  return getAggregateHistogram().copy();
}

代码示例来源:origin: jpos/jPOS

public void dump (PrintStream ps, String indent) {
  metrics.entrySet()
   .stream()
   .sorted(Map.Entry.comparingByKey())
   .forEach(e -> dumpPercentiles (ps, indent, e.getKey(), e.getValue().copy()));
}

代码示例来源:origin: jpos/jPOS

public void dumpHistograms (File dir, String prefix) {
    metrics.entrySet()
     .stream()
     .sorted(Map.Entry.comparingByKey())
     .forEach(e -> dumpHistogram (dir, prefix + e.getKey(), e.getValue().copy()));
  }
}

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

/**
   * @return a copy of the accumulated state since the reservoir was created
   */
  @Nonnull
  private synchronized Histogram updateRunningTotals() {
    intervalHistogram = recorder.getIntervalHistogram(intervalHistogram);
    runningTotals.add(intervalHistogram);
    return runningTotals.copy();
  }
}

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

/**
   * @return a copy of the accumulated state since the reservoir was created
   */
  @Nonnull
  private synchronized Histogram updateRunningTotals() {
    intervalHistogram = recorder.getIntervalHistogram(intervalHistogram);
    runningTotals.add(intervalHistogram);
    return runningTotals.copy();
  }
}

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

@Override
public synchronized Snapshot getSnapshot() {
 lastSnapshotHistogram = recorder.getIntervalHistogram(lastSnapshotHistogram);
 totalHistogram.add(lastSnapshotHistogram);
 HDRSnapshot snapshot = new HDRSnapshot(totalHistogram.copy(), lastSnapshotHistogram.copy());
 return reportTotalHistogram ? snapshot.totalSnapshot() : snapshot.sinceLastSnapshot();
}

相关文章