tolitius / hface

look your Hazelcast cluster in the face!
Eclipse Public License 1.0
74 stars 14 forks source link

add latencies (i.e. response time) for ops #1

Open tolitius opened 9 years ago

tolitius commented 9 years ago

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