use of com.hazelcast.simulator.probes.impl.HdrProbe in project hazelcast-simulator by hazelcast.
the class TestContainer_TimeStep_AsyncSupportTest method getProbeTotalCount.
private static long getProbeTotalCount(String probeName, TestContainer container) {
Map<String, Probe> probeMap = container.getProbeMap();
HdrProbe probe = (HdrProbe) probeMap.get(probeName);
Recorder recorder = probe.getRecorder();
return recorder.getIntervalHistogram().getTotalCount();
}
use of com.hazelcast.simulator.probes.impl.HdrProbe in project hazelcast-simulator by hazelcast.
the class TestPerformanceTracker method makeUpdate.
private void makeUpdate(long updateIntervalMillis, long currentTimeMillis) {
Map<String, Probe> probeMap = testContainer.getProbeMap();
Map<String, Histogram> intervalHistograms = new HashMap<String, Histogram>(probeMap.size());
long intervalPercentileLatency = -1;
double intervalMean = -1;
long intervalMaxLatency = -1;
long iterations = testContainer.iteration() - iterationsDuringWarmup;
long intervalOperationCount = iterations - lastIterations;
for (Map.Entry<String, Probe> entry : probeMap.entrySet()) {
String probeName = entry.getKey();
Probe probe = entry.getValue();
if (!(probe instanceof HdrProbe)) {
continue;
}
HdrProbe hdrProbe = (HdrProbe) probe;
Histogram intervalHistogram = hdrProbe.getRecorder().getIntervalHistogram();
intervalHistogram.setStartTimeStamp(lastUpdateMillis);
intervalHistogram.setEndTimeStamp(currentTimeMillis);
intervalHistograms.put(probeName, intervalHistogram);
long percentileValue = intervalHistogram.getValueAtPercentile(INTERVAL_LATENCY_PERCENTILE);
if (percentileValue > intervalPercentileLatency) {
intervalPercentileLatency = percentileValue;
}
double meanLatency = intervalHistogram.getMean();
if (meanLatency > intervalMean) {
intervalMean = meanLatency;
}
long maxValue = intervalHistogram.getMaxValue();
if (maxValue > intervalMaxLatency) {
intervalMaxLatency = maxValue;
}
if (probe.isPartOfTotalThroughput()) {
intervalOperationCount += intervalHistogram.getTotalCount();
}
}
this.intervalHistogramMap = intervalHistograms;
this.intervalLatency999PercentileNanos = intervalPercentileLatency;
this.intervalLatencyAvgNanos = intervalMean;
this.intervalLatencyMaxNanos = intervalMaxLatency;
this.intervalOperationCount = intervalOperationCount;
this.totalOperationCount += intervalOperationCount;
long intervalTimeDelta = currentTimeMillis - lastUpdateMillis;
long totalTimeDelta = currentTimeMillis - startMeasuringTime();
this.intervalThroughput = (intervalOperationCount * ONE_SECOND_IN_MILLIS) / (double) intervalTimeDelta;
this.totalThroughput = (totalOperationCount * ONE_SECOND_IN_MILLIS / (double) totalTimeDelta);
this.lastIterations = iterations;
this.nextUpdateMillis += updateIntervalMillis;
this.lastUpdateMillis = currentTimeMillis;
}
use of com.hazelcast.simulator.probes.impl.HdrProbe in project hazelcast-simulator by hazelcast.
the class PropertyBinding method getOrCreateProbe.
public Probe getOrCreateProbe(String probeName, boolean partOfTotalThroughput) {
if (probeClass == null) {
return EmptyProbe.INSTANCE;
}
Probe probe = probeMap.get(probeName);
if (probe == null) {
probe = new HdrProbe(partOfTotalThroughput);
probeMap.put(probeName, probe);
}
return probe;
}
Aggregations