improve WebSessionStat

This commit is contained in:
wenshao
2012-08-18 17:09:48 +08:00
parent 91f4d84ffe
commit b9a9819640
5 changed files with 49 additions and 23 deletions
@@ -30,6 +30,16 @@ public class Histogram {
rangeCounters[i] = new AtomicLong();
}
}
public static Histogram makeHistogram(int rangeCount) {
long[] rangeValues = new long[rangeCount];
for (int i = 0; i < rangeValues.length; ++i) {
rangeValues[i] = (long) Math.pow(10, i);
}
return new Histogram(rangeValues);
}
public Histogram(TimeUnit timeUnit, long... ranges){
this.ranges = new long[ranges.length];