本文整理了Java中org.HdrHistogram.Histogram.setStartTimeStamp()
方法的一些代码示例,展示了Histogram.setStartTimeStamp()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Histogram.setStartTimeStamp()
方法的具体详情如下:
包路径:org.HdrHistogram.Histogram
类名称:Histogram
方法名:setStartTimeStamp
暂无
代码示例来源:origin: HdrHistogram/HdrHistogram
@Override
public synchronized void setStartTimeStamp(final long timeStampMsec) {
super.setStartTimeStamp(timeStampMsec);
}
代码示例来源:origin: HdrHistogram/HdrHistogram
/**
* Construct an auto-resizing {@link Recorder} with a lowest discernible value of
* 1 and an auto-adjusting highestTrackableValue. Can auto-resize up to track values up to (Long.MAX_VALUE / 2).
*
* @param numberOfSignificantValueDigits Specifies the precision to use. This is the number of significant
* decimal digits to which the histogram will maintain value resolution
* and separation. Must be a non-negative integer between 0 and 5.
*/
public Recorder(final int numberOfSignificantValueDigits) {
activeHistogram = new InternalConcurrentHistogram(instanceId, numberOfSignificantValueDigits);
inactiveHistogram = null;
activeHistogram.setStartTimeStamp(System.currentTimeMillis());
}
代码示例来源: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: HdrHistogram/HdrHistogram
/**
* Construct a {@link Recorder} given the Lowest and highest values to be tracked and a number
* of significant decimal digits. Providing a lowestDiscernibleValue is useful is situations where the units used
* for the histogram's values are much smaller that the minimal accuracy required. E.g. when tracking
* time values stated in nanosecond units, where the minimal accuracy required is a microsecond, the
* proper value for lowestDiscernibleValue would be 1000.
*
* @param lowestDiscernibleValue The lowest value that can be tracked (distinguished from 0) by the histogram.
* Must be a positive integer that is {@literal >=} 1. May be internally rounded
* down to nearest power of 2.
* @param highestTrackableValue The highest value to be tracked by the histogram. Must be a positive
* integer that is {@literal >=} (2 * lowestDiscernibleValue).
* @param numberOfSignificantValueDigits Specifies the precision to use. This is the number of significant
* decimal digits to which the histogram will maintain value resolution
* and separation. Must be a non-negative integer between 0 and 5.
*/
public Recorder(final long lowestDiscernibleValue,
final long highestTrackableValue,
final int numberOfSignificantValueDigits) {
activeHistogram = new InternalAtomicHistogram(
instanceId, lowestDiscernibleValue, highestTrackableValue, numberOfSignificantValueDigits);
inactiveHistogram = null;
activeHistogram.setStartTimeStamp(System.currentTimeMillis());
}
代码示例来源: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
activeHistogram.setStartTimeStamp(now);
inactiveHistogram.setEndTimeStamp(now);
代码示例来源:origin: org.hdrhistogram/HdrHistogram
@Override
public synchronized void setStartTimeStamp(final long timeStampMsec) {
super.setStartTimeStamp(timeStampMsec);
}
代码示例来源:origin: org.hdrhistogram/HdrHistogram
/**
* Construct an auto-resizing {@link Recorder} with a lowest discernible value of
* 1 and an auto-adjusting highestTrackableValue. Can auto-resize up to track values up to (Long.MAX_VALUE / 2).
*
* @param numberOfSignificantValueDigits Specifies the precision to use. This is the number of significant
* decimal digits to which the histogram will maintain value resolution
* and separation. Must be a non-negative integer between 0 and 5.
*/
public Recorder(final int numberOfSignificantValueDigits) {
activeHistogram = new InternalConcurrentHistogram(instanceId, numberOfSignificantValueDigits);
inactiveHistogram = null;
activeHistogram.setStartTimeStamp(System.currentTimeMillis());
}
代码示例来源:origin: org.hdrhistogram/HdrHistogram
/**
* Construct a {@link Recorder} given the Lowest and highest values to be tracked and a number
* of significant decimal digits. Providing a lowestDiscernibleValue is useful is situations where the units used
* for the histogram's values are much smaller that the minimal accuracy required. E.g. when tracking
* time values stated in nanosecond units, where the minimal accuracy required is a microsecond, the
* proper value for lowestDiscernibleValue would be 1000.
*
* @param lowestDiscernibleValue The lowest value that can be tracked (distinguished from 0) by the histogram.
* Must be a positive integer that is {@literal >=} 1. May be internally rounded
* down to nearest power of 2.
* @param highestTrackableValue The highest value to be tracked by the histogram. Must be a positive
* integer that is {@literal >=} (2 * lowestDiscernibleValue).
* @param numberOfSignificantValueDigits Specifies the precision to use. This is the number of significant
* decimal digits to which the histogram will maintain value resolution
* and separation. Must be a non-negative integer between 0 and 5.
*/
public Recorder(final long lowestDiscernibleValue,
final long highestTrackableValue,
final int numberOfSignificantValueDigits) {
activeHistogram = new InternalAtomicHistogram(
instanceId, lowestDiscernibleValue, highestTrackableValue, numberOfSignificantValueDigits);
inactiveHistogram = null;
activeHistogram.setStartTimeStamp(System.currentTimeMillis());
}
代码示例来源: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: LatencyUtils/LatencyUtils
activePauseCorrectionsHistogram.setStartTimeStamp(now);
代码示例来源:origin: org.latencyutils/LatencyUtils
activePauseCorrectionsHistogram.setStartTimeStamp(now);
代码示例来源:origin: org.hdrhistogram/HdrHistogram
activeHistogram.setStartTimeStamp(now);
inactiveHistogram.setEndTimeStamp(now);
内容来源于网络,如有侵权,请联系作者删除!