Package io.opencensus.implcore.stats
Class MutableViewData.IntervalMutableViewData
- java.lang.Object
-
- io.opencensus.implcore.stats.MutableViewData
-
- io.opencensus.implcore.stats.MutableViewData.IntervalMutableViewData
-
- Enclosing class:
- MutableViewData
private static final class MutableViewData.IntervalMutableViewData extends MutableViewData
-
-
Field Summary
Fields Modifier and Type Field Description private Duration
bucketDuration
private java.util.ArrayDeque<IntervalBucket>
buckets
private static int
N
private Duration
totalDuration
-
Fields inherited from class io.opencensus.implcore.stats.MutableViewData
ZERO_TIMESTAMP
-
-
Constructor Summary
Constructors Modifier Constructor Description private
IntervalMutableViewData(View view, Timestamp start)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static <T> java.util.Map<T,MutableAggregation>
aggregateOnEachTagValueList(com.google.common.collect.Multimap<T,MutableAggregation> multimap, Aggregation aggregation, Measure measure)
(package private) void
clearStats()
private java.util.Map<java.util.List<TagValue>,AggregationData>
combineBucketsAndGetAggregationMap(Timestamp now)
private static void
putBucketsIntoMultiMap(java.util.ArrayDeque<IntervalBucket> buckets, com.google.common.collect.Multimap<java.util.List<TagValue>,MutableAggregation> multimap, Aggregation aggregation, Measure measure, Timestamp now)
private static <T> void
putFractionalMutableAggregationsToMultiMap(java.util.Map<T,MutableAggregation> mutableAggrMap, com.google.common.collect.Multimap<T,MutableAggregation> multimap, Aggregation aggregation, Measure measure, double fraction)
(package private) void
record(TagContext context, double value, Timestamp timestamp, java.util.Map<java.lang.String,AttachmentValue> attachments)
Record stats with the given tags.private void
refreshBucketList(Timestamp now)
(package private) void
resumeStatsCollection(Timestamp now)
private void
shiftBucketList(long numOfPadBuckets, Timestamp now)
private static Timestamp
subtractDuration(Timestamp timestamp, Duration duration)
(package private) Metric
toMetric(Timestamp now, CurrentState.State state)
(package private) ViewData
toViewData(Timestamp now, CurrentState.State state)
Convert thisMutableViewData
toViewData
.-
Methods inherited from class io.opencensus.implcore.stats.MutableViewData
create, getView
-
-
-
-
Field Detail
-
N
private static final int N
- See Also:
- Constant Field Values
-
buckets
private final java.util.ArrayDeque<IntervalBucket> buckets
-
totalDuration
private final Duration totalDuration
-
bucketDuration
private final Duration bucketDuration
-
-
Method Detail
-
toMetric
@Nullable Metric toMetric(Timestamp now, CurrentState.State state)
- Specified by:
toMetric
in classMutableViewData
-
record
void record(TagContext context, double value, Timestamp timestamp, java.util.Map<java.lang.String,AttachmentValue> attachments)
Description copied from class:MutableViewData
Record stats with the given tags.- Specified by:
record
in classMutableViewData
-
toViewData
ViewData toViewData(Timestamp now, CurrentState.State state)
Description copied from class:MutableViewData
Convert thisMutableViewData
toViewData
.- Specified by:
toViewData
in classMutableViewData
-
clearStats
void clearStats()
- Specified by:
clearStats
in classMutableViewData
-
resumeStatsCollection
void resumeStatsCollection(Timestamp now)
- Specified by:
resumeStatsCollection
in classMutableViewData
-
refreshBucketList
private void refreshBucketList(Timestamp now)
-
shiftBucketList
private void shiftBucketList(long numOfPadBuckets, Timestamp now)
-
combineBucketsAndGetAggregationMap
private java.util.Map<java.util.List<TagValue>,AggregationData> combineBucketsAndGetAggregationMap(Timestamp now)
-
putBucketsIntoMultiMap
private static void putBucketsIntoMultiMap(java.util.ArrayDeque<IntervalBucket> buckets, com.google.common.collect.Multimap<java.util.List<TagValue>,MutableAggregation> multimap, Aggregation aggregation, Measure measure, Timestamp now)
-
putFractionalMutableAggregationsToMultiMap
private static <T> void putFractionalMutableAggregationsToMultiMap(java.util.Map<T,MutableAggregation> mutableAggrMap, com.google.common.collect.Multimap<T,MutableAggregation> multimap, Aggregation aggregation, Measure measure, double fraction)
-
aggregateOnEachTagValueList
private static <T> java.util.Map<T,MutableAggregation> aggregateOnEachTagValueList(com.google.common.collect.Multimap<T,MutableAggregation> multimap, Aggregation aggregation, Measure measure)
-
-