support logStats

This commit is contained in:
wenshao
2013-05-19 17:13:45 +08:00
parent e21b08262b
commit 9a892241ea
9 changed files with 203 additions and 61 deletions
@@ -76,12 +76,13 @@ public class Histogram {
}
return array;
}
public long[] toArrayAndReset() {
long[] array = new long[rangeCounters.length()];
for (int i = 0; i < rangeCounters.length(); i++) {
array[i] = rangeCounters.getAndSet(i, 0);
}
return array;
}