Search in sources :

Example 1 with AbstractHistogram

use of org.HdrHistogram_voltpatches.AbstractHistogram in project voltdb by VoltDB.

the class LatencyStats method updateStatsRow.

@Override
protected void updateStatsRow(Object rowKey, Object[] rowValues) {
    super.updateStatsRow(rowKey, rowValues);
    AbstractHistogram diffHist = m_diffHistProvider.get();
    // Override timestamp from the procedure call with the one from when the data was fetched.
    rowValues[columnNameToIndex.get("TIMESTAMP")] = diffHist.getEndTimeStamp();
    rowValues[columnNameToIndex.get("INTERVAL")] = INTERVAL_MS;
    rowValues[columnNameToIndex.get("COUNT")] = diffHist.getTotalCount();
    rowValues[columnNameToIndex.get("TPS")] = (int) (TimeUnit.SECONDS.toMillis(diffHist.getTotalCount()) / INTERVAL_MS);
    rowValues[columnNameToIndex.get("P50")] = diffHist.getValueAtPercentile(50D);
    rowValues[columnNameToIndex.get("P95")] = diffHist.getValueAtPercentile(95D);
    rowValues[columnNameToIndex.get("P99")] = diffHist.getValueAtPercentile(99D);
    rowValues[columnNameToIndex.get("P99.9")] = diffHist.getValueAtPercentile(99.9D);
    rowValues[columnNameToIndex.get("P99.99")] = diffHist.getValueAtPercentile(99.99D);
    rowValues[columnNameToIndex.get("P99.999")] = diffHist.getValueAtPercentile(99.999D);
    rowValues[columnNameToIndex.get("MAX")] = diffHist.getMaxValue();
}
Also used : AbstractHistogram(org.HdrHistogram_voltpatches.AbstractHistogram)

Aggregations

AbstractHistogram (org.HdrHistogram_voltpatches.AbstractHistogram)1