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

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

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

Histogram.getStartTimeStamp介绍

暂无

代码示例

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

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

代码示例来源: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 getStartTimeStamp() {
  return super.getStartTimeStamp();
}

代码示例来源: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());

相关文章