org.javasimon.callback.quantiles
Class FixedQuantilesCallback
java.lang.Object
org.javasimon.callback.CallbackSkeleton
org.javasimon.callback.quantiles.QuantilesCallback
org.javasimon.callback.quantiles.FixedQuantilesCallback
- All Implemented Interfaces:
- Callback
public class FixedQuantilesCallback
- extends QuantilesCallback
Callback which stores data in buckets to compute quantiles.
Buckets are create using constant configuration.
- Author:
- gquintana
|
Field Summary |
private int |
bucketNb
Number of buckets. |
private long |
max
Buckets upper bound in milliseconds. |
private long |
min
Buckets lower bound in milliseconds. |
| Methods inherited from class org.javasimon.callback.quantiles.QuantilesCallback |
createBuckets, createLogTemplate, getBuckets, getBucketsType, getOrCreateBuckets, isLogEnabled, onSimonReset, onStopwatchAdd, onStopwatchAdd, onStopwatchSplit, onStopwatchSplit, onStopwatchStop, sampleBuckets, setLogEnabled |
| Methods inherited from class org.javasimon.callback.CallbackSkeleton |
cleanup, initialize, onCounterDecrease, onCounterIncrease, onCounterSet, onManagerClear, onManagerMessage, onManagerWarning, onSimonCreated, onSimonDestroyed, onStopwatchStart |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
min
private final long min
- Buckets lower bound in milliseconds.
max
private final long max
- Buckets upper bound in milliseconds.
bucketNb
private final int bucketNb
- Number of buckets.
FixedQuantilesCallback
public FixedQuantilesCallback(long min,
long max,
int bucketNb)
- Main constructor.
FixedQuantilesCallback
public FixedQuantilesCallback(BucketsType bucketsType,
long min,
long max,
int bucketNb)
- Constructor with all configuration
- Parameters:
bucketsType - Linear or exponentialmin - Minmax - MaxbucketNb - Number of buckets
createBuckets
protected Buckets createBuckets(Stopwatch stopwatch)
- Create buckets using callback attributes
- Specified by:
createBuckets in class QuantilesCallback
- Parameters:
stopwatch - Target stopwatch
- Returns:
- Created buckets
getMin
public long getMin()
getMax
public long getMax()
getBucketNb
public int getBucketNb()
Copyright © 2013. All Rights Reserved.