public class SpanToolkit extends Object
Combinable
and
Combiner
) to form the largest time span where the combined value is still deemed to be
over some threshold. Threshold can be either a defined limit or a calculated density.
Currently, it's up to the caller of this toolkit to call the methods with a subset of items that have only one item iterable, which means that events should not overlap in time.
Constructor and Description |
---|
SpanToolkit() |
Modifier and Type | Method and Description |
---|---|
static SpanSquare |
getMaxCountCluster(org.openjdk.jmc.common.item.IItemCollection items,
org.openjdk.jmc.common.item.IAttribute<org.openjdk.jmc.common.unit.IQuantity> countAttribute,
org.openjdk.jmc.common.item.IAttribute<org.openjdk.jmc.common.unit.IQuantity> timestampAttribute)
Calculates the largest count cluster.
|
static SpanSquare |
getMaxDurationCluster(org.openjdk.jmc.common.item.IItemCollection items)
Calculates the largest duration cluster.
|
static SpanLimit |
getMaxSpanLimit(org.openjdk.jmc.common.item.IItemCollection items,
org.openjdk.jmc.common.item.IAttribute<org.openjdk.jmc.common.unit.IQuantity> valueAttribute,
org.openjdk.jmc.common.item.IAttribute<org.openjdk.jmc.common.unit.IQuantity> endTimeAttribute,
double limit)
Calculates the longest span where the combined value still is above the limit.
|
public static SpanSquare getMaxCountCluster(org.openjdk.jmc.common.item.IItemCollection items, org.openjdk.jmc.common.item.IAttribute<org.openjdk.jmc.common.unit.IQuantity> countAttribute, org.openjdk.jmc.common.item.IAttribute<org.openjdk.jmc.common.unit.IQuantity> timestampAttribute)
items
- the item collectioncountAttribute
- the attribute to get count value from, is assumed to be an accumulative value, for
example exception statisticstimestampAttribute
- the attribute to get a time stamp frompublic static SpanSquare getMaxDurationCluster(org.openjdk.jmc.common.item.IItemCollection items)
items
- the item collectionpublic static SpanLimit getMaxSpanLimit(org.openjdk.jmc.common.item.IItemCollection items, org.openjdk.jmc.common.item.IAttribute<org.openjdk.jmc.common.unit.IQuantity> valueAttribute, org.openjdk.jmc.common.item.IAttribute<org.openjdk.jmc.common.unit.IQuantity> endTimeAttribute, double limit)
items
- the item collectionvalueAttribute
- the value attributeendTimeAttribute
- the end time attributelimit
- the min limitCopyright © 2020. All rights reserved.