mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improve WebSessionStat
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user