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

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

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

Histogram.getEndTimeStamp介绍

暂无

代码示例

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

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

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

@Override
public synchronized String serialize(Histogram histogram) {
 int requiredBytes = histogram.getNeededByteBufferCapacity() + (2 * Long.BYTES);  // Long.BYTES for start and end timestamps
 if ((targetBuffer == null) || targetBuffer.capacity() < requiredBytes) {
  targetBuffer = ByteBuffer.allocate(requiredBytes);
 }
 targetBuffer.clear();
 int compressedLength = histogram.encodeIntoCompressedByteBuffer(targetBuffer, Deflater.BEST_COMPRESSION);
 targetBuffer.putLong(compressedLength, histogram.getStartTimeStamp());
 targetBuffer.putLong(compressedLength + Long.BYTES, histogram.getEndTimeStamp());
 byte[] compressedArray = Arrays.copyOf(targetBuffer.array(), compressedLength + (2 * Long.BYTES));
 return DatatypeConverter.printBase64Binary(compressedArray);
}

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

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

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

public void writeInterval(Histogram h) {
    StringBuilder csvLine = new StringBuilder(1024);
    csvLine.append("Tag=").append(h.getTag()).append(",");
    Double start = ((double) h.getStartTimeStamp() - baseTime) / 1000.0D;
    Double end = ((double) h.getEndTimeStamp() - baseTime) / 1000.0D;
    String len = String.format(Locale.US, "%.3f", (end - start));
    csvLine.append(start);
    csvLine.append(",").append(len);
    csvLine.append(",").append(h.getTotalCount());
    csvLine.append(",").append(h.getMinValue());
    csvLine.append(",").append(h.getValueAtPercentile(0.25D));
    csvLine.append(",").append(h.getValueAtPercentile(0.50D));
    csvLine.append(",").append(h.getValueAtPercentile(0.75D));
    csvLine.append(",").append(h.getValueAtPercentile(0.90D));
    csvLine.append(",").append(h.getValueAtPercentile(0.95D));
    csvLine.append(",").append(h.getValueAtPercentile(0.98D));
    csvLine.append(",").append(h.getValueAtPercentile(0.99D));
    csvLine.append(",").append(h.getValueAtPercentile(0.999D));
    csvLine.append(",").append(h.getValueAtPercentile(0.9999D));
    csvLine.append(",").append(h.getMaxValue());
    writer.println(csvLine.toString());

  }
}

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

protected Object[] buildRegularHistogramStatistics(Histogram intervalHistogram, Histogram accumulatedHistogram) {
  double intervalThroughput = ((double) (intervalHistogram.getTotalCount())
      / (intervalHistogram.getEndTimeStamp() - intervalHistogram.getStartTimeStamp()));
      / (accumulatedHistogram.getEndTimeStamp() - accumulatedHistogram.getStartTimeStamp());
      ((intervalHistogram.getEndTimeStamp() / 1000.0) - logReader.getStartTimeSec()),
      (intervalHistogram.getEndTimeStamp() / 1000.0),

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

protected Object[] buildRegularHistogramStatistics(Histogram intervalHistogram, Histogram accumulatedRegularHistogram) {
  return new Object[]{((intervalHistogram.getEndTimeStamp() / 1000.0) - logReader.getStartTimeSec()),
      // values recorded during the last reporting interval
      intervalHistogram.getTotalCount(),
      intervalHistogram.getValueAtPercentile(50.0) / config.outputValueUnitRatio,
      intervalHistogram.getValueAtPercentile(90.0) / config.outputValueUnitRatio,
      intervalHistogram.getMaxValue() / config.outputValueUnitRatio,
      // values recorded from the beginning until now
      accumulatedRegularHistogram.getTotalCount(),
      accumulatedRegularHistogram.getValueAtPercentile(50.0) / config.outputValueUnitRatio,
      accumulatedRegularHistogram.getValueAtPercentile(90.0) / config.outputValueUnitRatio,
      accumulatedRegularHistogram.getValueAtPercentile(99.0) / config.outputValueUnitRatio,
      accumulatedRegularHistogram.getValueAtPercentile(99.9) / config.outputValueUnitRatio,
      accumulatedRegularHistogram.getValueAtPercentile(99.99) / config.outputValueUnitRatio,
      accumulatedRegularHistogram.getMaxValue() / config.outputValueUnitRatio};
}

相关文章