Package io.opencensus.metrics.export
Class Summary.Snapshot
java.lang.Object
io.opencensus.metrics.export.Summary.Snapshot
- Direct Known Subclasses:
AutoValue_Summary_Snapshot
- Enclosing class:
Summary
Represents the summary observation of the recorded events over a sliding time window.
- Since:
- 0.17
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Represents the value at a given percentile of a distribution. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Summary.Snapshot
create
(Long count, Double sum, List<Summary.Snapshot.ValueAtPercentile> valueAtPercentiles) Creates aSummary.Snapshot
.abstract Long
getCount()
Returns the number of values in thisSnapshot
.abstract Double
getSum()
Returns the sum of values in thisSnapshot
.abstract List
<Summary.Snapshot.ValueAtPercentile> Returns the list ofValueAtPercentile
s in thisSnapshot
.
-
Constructor Details
-
Snapshot
public Snapshot()
-
-
Method Details
-
getCount
Returns the number of values in thisSnapshot
. If not available returnsnull
.- Returns:
- the number of values in this
Snapshot
. - Since:
- 0.17
-
getSum
Returns the sum of values in thisSnapshot
. If not available returnsnull
.- Returns:
- the sum of values in this
Snapshot
. - Since:
- 0.17
-
getValueAtPercentiles
Returns the list ofValueAtPercentile
s in thisSnapshot
.- Returns:
- the list of
ValueAtPercentile
s in thisSnapshot
. - Since:
- 0.17
-
create
public static Summary.Snapshot create(@Nullable Long count, @Nullable Double sum, List<Summary.Snapshot.ValueAtPercentile> valueAtPercentiles) Creates aSummary.Snapshot
.- Parameters:
count
- the number of values in thisSnapshot
.sum
- the number of values in thisSnapshot
.valueAtPercentiles
- the list ofValueAtPercentile
.- Returns:
- a
Snapshot
with the given values. - Since:
- 0.17
-