Report mean cassandra response times per request, not total.

This commit is contained in:
Logan Hanks
2011-12-29 11:01:35 -08:00
parent 6daeb24c38
commit b1388f0c12

View File

@@ -126,7 +126,9 @@ class Stats:
for key, (total_time, count) in events:
data['cassandra.' + key] = str(count) + '|c'
if key.endswith('.ok'):
data['cassandra.' + key[:-3]] = str(total_time) + '|ms'
divisor = count or 1
mean = total_time / divisor
data['cassandra.' + key[:-3]] = str(mean) + '|ms'
self.connection.send(data)
class CacheStats: