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

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

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

Histogram.setEndTimeStamp介绍

暂无

代码示例

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

@Override
public synchronized void setEndTimeStamp(final long timeStampMsec) {
  super.setEndTimeStamp(timeStampMsec);
}

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

@Override
public Histogram deserialize(String serialized) {
 try {
  byte[] rawBytes = DatatypeConverter.parseBase64Binary(serialized);
  final ByteBuffer buffer = ByteBuffer.wrap(rawBytes, 0, rawBytes.length - (2 * Long.BYTES));
  Histogram histogram = (Histogram) EncodableHistogram.decodeFromCompressedByteBuffer(buffer, 0);
  final ByteBuffer timestamps = ByteBuffer.wrap(rawBytes, 0, rawBytes.length);
  histogram.setStartTimeStamp(timestamps.getLong(rawBytes.length - (2 * Long.BYTES)));
  histogram.setEndTimeStamp(timestamps.getLong(rawBytes.length - (2 * Long.BYTES) + Long.BYTES));
  return histogram;
 } catch (DataFormatException e) {
  throw new RuntimeException(e);
 }
}

代码示例来源:origin: org.apache.logging.log4j/log4j-core

private static Histogram createResultHistogram(final List<Histogram> list, final long start, final long end) {
  final Histogram result = new Histogram(TimeUnit.SECONDS.toNanos(10), 3);
  result.setStartTimeStamp(start);
  result.setEndTimeStamp(end);
  for (final Histogram hist : list) {
    result.add(hist);
  }
  return result;
}

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

inactiveHistogram.setEndTimeStamp(now);

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

@Override
public synchronized void setEndTimeStamp(final long timeStampMsec) {
  super.setEndTimeStamp(timeStampMsec);
}

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

void writeStatsToFile(long epochTime, String timestamp) {
  performanceLogWriter.write(
      epochTime,
      timestamp,
      totalOperationCount,
      intervalOperationCount,
      intervalThroughput,
      0,
      0);
  for (Map.Entry<String, Histogram> histogramEntry : intervalHistogramMap.entrySet()) {
    String probeName = histogramEntry.getKey();
    HistogramLogWriter histogramLogWriter = histogramLogWriterMap.get(probeName);
    if (histogramLogWriter == null) {
      histogramLogWriter = createHistogramLogWriter(
          testContainer.getTestCase().getId(), probeName, testStartedTimestamp);
      histogramLogWriterMap.put(probeName, histogramLogWriter);
    }
    Histogram intervalHistogram = histogramEntry.getValue();
    intervalHistogram.setStartTimeStamp(previousWriteToFile);
    intervalHistogram.setEndTimeStamp(epochTime);
    histogramLogWriter.outputIntervalHistogram(intervalHistogram);
  }
  previousWriteToFile = epochTime;
}

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

/**
 * @return a copy of the accumulated state since the reservoir last had a snapshot
 */
private synchronized Histogram getDataSinceLastSnapshotAndUpdate() {
  intervalHistogram = recorder.getIntervalHistogram(intervalHistogram);
  long intervalHistogramStartTime = intervalHistogramEndTime;
  intervalHistogramEndTime = System.currentTimeMillis();
  intervalHistogram.setTag(metricName);
  intervalHistogram.setStartTimeStamp(intervalHistogramStartTime);
  intervalHistogram.setEndTimeStamp(intervalHistogramEndTime);
  lastHistogram = intervalHistogram.copy();
  lastHistogram.setTag(metricName);
  if (writer!=null) {
    writer.outputIntervalHistogram(lastHistogram);
  }
  return lastHistogram;
}

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

private synchronized void updateHistograms() {
  try {
    recordingPhaser.readerLock();
    inactiveRawDataHistogram.reset();
    inactivePauseCorrectionsHistogram.reset();
    swapHistograms();
    long now = System.currentTimeMillis();
    activeRecordingHistogram.setStartTimeStamp(now);
    activePauseCorrectionsHistogram.setStartTimeStamp(now);
    inactiveRawDataHistogram.setEndTimeStamp(now);
    inactivePauseCorrectionsHistogram.setEndTimeStamp(now);
    // Make sure we are not in the middle of recording a value on the previously current recording histogram:
    // Flip phase on epochs to make sure no in-flight recordings are active on pre-flip phase:
    recordingPhaser.flipPhase();
  } finally {
    recordingPhaser.readerUnlock();
  }
}

代码示例来源:origin: org.latencyutils/LatencyUtils

private synchronized void updateHistograms() {
  try {
    recordingPhaser.readerLock();
    inactiveRawDataHistogram.reset();
    inactivePauseCorrectionsHistogram.reset();
    swapHistograms();
    long now = System.currentTimeMillis();
    activeRecordingHistogram.setStartTimeStamp(now);
    activePauseCorrectionsHistogram.setStartTimeStamp(now);
    inactiveRawDataHistogram.setEndTimeStamp(now);
    inactivePauseCorrectionsHistogram.setEndTimeStamp(now);
    // Make sure we are not in the middle of recording a value on the previously current recording histogram:
    // Flip phase on epochs to make sure no in-flight recordings are active on pre-flip phase:
    recordingPhaser.flipPhase();
  } finally {
    recordingPhaser.readerUnlock();
  }
}

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

inactiveHistogram.setEndTimeStamp(now);

相关文章