hface
hface copied to clipboard
add latencies (i.e. response time) for ops
for example, here is relevant stats hz collects for map get ops:
public void incrementGets(long latency) {
GET_COUNT_UPDATER.incrementAndGet(this);
TOTAL_GET_LATENCIES_UPDATER.addAndGet(this, latency);
MAX_GET_LATENCY_UPDATER.set(this, Math.max(maxGetLatency, latency));
}
neither current or average latencies are recorded by hz, for some reason. so calculate it as:
( total get latency now - total get latency before ) / stats pull interval