Skip to content
Snippets Groups Projects
Commit 2c66bc65 authored by Jiongxin Liu's avatar Jiongxin Liu Committed by Chris Larsen
Browse files

[core] Export totalHistogram for HdrHistogram measurement

parent d04d9325
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,7 @@ package com.yahoo.ycsb.measurements;
import com.yahoo.ycsb.measurements.exporter.MeasurementsExporter;
import org.HdrHistogram.Histogram;
import org.HdrHistogram.HistogramIterationValue;
import org.HdrHistogram.HistogramLogWriter;
import org.HdrHistogram.Recorder;
......@@ -112,6 +113,18 @@ public class OneMeasurementHdrHistogram extends OneMeasurement {
}
exportStatusCounts(exporter);
// also export totalHistogram
for (HistogramIterationValue v : totalHistogram.recordedValues()) {
int value;
if (v.getValueIteratedTo() > (long)Integer.MAX_VALUE) {
value = Integer.MAX_VALUE;
} else {
value = (int)v.getValueIteratedTo();
}
exporter.write(getName(), Integer.toString(value), (double)v.getCountAtValueIteratedTo());
}
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment