public static class BTraceUtils.Aggregations
extends java.lang.Object
Constructor and Description |
---|
BTraceUtils.Aggregations() |
Modifier and Type | Method and Description |
---|---|
static void |
addToAggregation(Aggregation aggregation,
AggregationKey key,
long value)
Adds a value to the aggregation with a grouping key.
|
static void |
addToAggregation(Aggregation aggregation,
long value)
Adds a value to the aggregation with no grouping key.
|
static void |
clearAggregation(Aggregation aggregation)
Resets values within the aggregation to the default.
|
static Aggregation |
newAggregation(AggregationFunction type)
Creates a new aggregation based on the given aggregation function type.
|
static AggregationKey |
newAggregationKey(java.lang.Object element1)
Creates a grouping aggregation key with the provided value.
|
static AggregationKey |
newAggregationKey(java.lang.Object element1,
java.lang.Object element2)
Creates a composite grouping aggregation key with the provided values.
|
static AggregationKey |
newAggregationKey(java.lang.Object element1,
java.lang.Object element2,
java.lang.Object element3)
Creates a composite grouping aggregation key with the provided values.
|
static AggregationKey |
newAggregationKey(java.lang.Object element1,
java.lang.Object element2,
java.lang.Object element3,
java.lang.Object element4)
Creates a composite grouping aggregation key with the provided values.
|
static void |
printAggregation(java.lang.String name,
Aggregation aggregation) |
static void |
printAggregation(java.lang.String name,
Aggregation aggregation,
java.lang.String format) |
static void |
printAggregation(java.lang.String name,
java.lang.String format,
java.util.Collection<Aggregation> aggregationList) |
static void |
truncateAggregation(Aggregation aggregation,
int count)
Removes all aggregated values from the aggregation except for the largest or smallest
abs(count) elements. |
public static Aggregation newAggregation(AggregationFunction type)
type
- the aggregating function to be performed on the data being added to the aggregation.public static AggregationKey newAggregationKey(java.lang.Object element1)
element1
- the value of the aggregation keypublic static AggregationKey newAggregationKey(java.lang.Object element1, java.lang.Object element2)
element1
- the first element of the composite aggregation keyelement2
- the second element of the composite aggregation keypublic static AggregationKey newAggregationKey(java.lang.Object element1, java.lang.Object element2, java.lang.Object element3)
element1
- the first element of the composite aggregation keyelement2
- the second element of the composite aggregation keyelement3
- the third element of the composite aggregation keypublic static AggregationKey newAggregationKey(java.lang.Object element1, java.lang.Object element2, java.lang.Object element3, java.lang.Object element4)
element1
- the first element of the composite aggregation keyelement2
- the second element of the composite aggregation keyelement3
- the third element of the composite aggregation keyelement4
- the fourth element of the composite aggregation keypublic static void addToAggregation(Aggregation aggregation, long value)
aggregation
- the aggregation to which the value should be addedpublic static void addToAggregation(Aggregation aggregation, AggregationKey key, long value)
aggregation
- the aggregation to which the value should be addedkey
- the grouping aggregation keypublic static void clearAggregation(Aggregation aggregation)
aggregation
- the aggregation to be clearedpublic static void truncateAggregation(Aggregation aggregation, int count)
abs(count)
elements.
If count
is positive, the largest aggregated values in the aggregation will be
preserved. If count
is negative the smallest values will be preserved. If count
is zero then all elements will be removed.
Behavior is intended to be similar to the dtrace trunc()
function.
aggregation
- the aggregation to be truncatedcount
- the number of elements to preserve. If negative, the smallest abs(count)
elements are preserved.public static void printAggregation(java.lang.String name, Aggregation aggregation)
public static void printAggregation(java.lang.String name, Aggregation aggregation, java.lang.String format)
public static void printAggregation(java.lang.String name, java.lang.String format, java.util.Collection<Aggregation> aggregationList)