Class Summary.Snapshot

java.lang.Object
io.opencensus.metrics.export.Summary.Snapshot
Direct Known Subclasses:
AutoValue_Summary_Snapshot
Enclosing class:
Summary

@Immutable public abstract static class Summary.Snapshot extends Object
Represents the summary observation of the recorded events over a sliding time window.
Since:
0.17
  • Constructor Details

    • Snapshot

      public Snapshot()
  • Method Details

    • getCount

      @Nullable public abstract Long getCount()
      Returns the number of values in this Snapshot. If not available returns null.
      Returns:
      the number of values in this Snapshot.
      Since:
      0.17
    • getSum

      @Nullable public abstract Double getSum()
      Returns the sum of values in this Snapshot. If not available returns null.
      Returns:
      the sum of values in this Snapshot.
      Since:
      0.17
    • getValueAtPercentiles

      public abstract List<Summary.Snapshot.ValueAtPercentile> getValueAtPercentiles()
      Returns the list of ValueAtPercentiles in this Snapshot.
      Returns:
      the list of ValueAtPercentiles in this Snapshot.
      Since:
      0.17
    • create

      public static Summary.Snapshot create(@Nullable Long count, @Nullable Double sum, List<Summary.Snapshot.ValueAtPercentile> valueAtPercentiles)
      Creates a Summary.Snapshot.
      Parameters:
      count - the number of values in this Snapshot.
      sum - the number of values in this Snapshot.
      valueAtPercentiles - the list of ValueAtPercentile.
      Returns:
      a Snapshot with the given values.
      Since:
      0.17