|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.javasimon.callback.CallbackSkeleton
org.javasimon.callback.quantiles.QuantilesCallback
org.javasimon.callback.quantiles.PropertiesQuantilesCallback
public class PropertiesQuantilesCallback
Callback which stores data in buckets to compute quantiles.
Buckets are created from configuration stored in a Properties
file. Configuration file should look like:
# Global default values are set on root .min=0 .max=60000 .nb=5 .type=LINEAR # For org.javasimon group: more buckets org.javasimon.nb=10 # SlowClass is a performance bottleneck: higher upper bound org.javasimon.slow.SlowClass.max=300000 # Can use Exponential buckets for some Stopwatches org.javasimon.special.type=EXPONENTIAL
| Nested Class Summary | |
|---|---|
private class |
PropertiesQuantilesCallback.EnumPropertyType<E extends Enum<E>>
Get enum property for Simon |
private class |
PropertiesQuantilesCallback.PropertyType<T>
Base class for property types |
| Nested classes/interfaces inherited from interface org.javasimon.callback.Callback |
|---|
Callback.Event |
| Field Summary | |
|---|---|
private PropertiesQuantilesCallback.EnumPropertyType<BucketsType> |
bucketsTypeEnumPropertyType
Get bucket type property for Simon |
private PropertiesQuantilesCallback.PropertyType<Integer> |
integerPropertyType
Get integer property for Simon |
private PropertiesQuantilesCallback.PropertyType<Long> |
longPropertyType
Get long property for Simon |
private Properties |
properties
Properties containing configuration |
| Fields inherited from class org.javasimon.callback.quantiles.QuantilesCallback |
|---|
ATTR_NAME_BUCKETS |
| Constructor Summary | |
|---|---|
PropertiesQuantilesCallback(Properties properties)
Main constructor |
|
| Method Summary | |
|---|---|
private static String |
cleanString(String s)
Remove space at both ends and convert empty strings to null |
protected Buckets |
createBuckets(Stopwatch stopwatch)
Create buckets using callback attributes |
private String |
getProperty(Simon simon,
String name)
Get property for Simon |
| 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 |
| Field Detail |
|---|
private final Properties properties
private final PropertiesQuantilesCallback.PropertyType<Long> longPropertyType
private final PropertiesQuantilesCallback.PropertyType<Integer> integerPropertyType
private final PropertiesQuantilesCallback.EnumPropertyType<BucketsType> bucketsTypeEnumPropertyType
| Constructor Detail |
|---|
public PropertiesQuantilesCallback(Properties properties)
properties - Properties containing configuration| Method Detail |
|---|
protected Buckets createBuckets(Stopwatch stopwatch)
createBuckets in class QuantilesCallbackstopwatch - Target stopwatch
private String getProperty(Simon simon,
String name)
simon - Simonname - Property name
private static String cleanString(String s)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||