Record Class CountingDispatcher.Snapshot

java.lang.Object
java.lang.Record
com.framed.streamer.dispatcher.CountingDispatcher.Snapshot
Record Components:
received - datapoints handed to CountingDispatcher.push(com.framed.io.dispatch.DataPoint<?>)
dropped - datapoints the bounded push queue could not accept
handlerErrors - messages that failed to parse before reaching the queue
perChannel - received count per channel identifier, ordered by identifier
wallElapsedMillis - wall-clock span between the first and last push
achievedHz - received divided by wallElapsedMillis, in datapoints/s
meanLatencyMillis - mean emit→sink latency
p50LatencyMillis - median emit→sink latency
p95LatencyMillis - 95th-percentile emit→sink latency
p99LatencyMillis - 99th-percentile emit→sink latency
maxLatencyMillis - largest observed emit→sink latency
Enclosing class:
CountingDispatcher

public static record CountingDispatcher.Snapshot(long received, long dropped, long handlerErrors, Map<String,Long> perChannel, long wallElapsedMillis, double achievedHz, double meanLatencyMillis, long p50LatencyMillis, long p95LatencyMillis, long p99LatencyMillis, long maxLatencyMillis) extends Record
Immutable view of one measurement run.
  • Constructor Details

    • Snapshot

      public Snapshot(long received, long dropped, long handlerErrors, Map<String,Long> perChannel, long wallElapsedMillis, double achievedHz, double meanLatencyMillis, long p50LatencyMillis, long p95LatencyMillis, long p99LatencyMillis, long maxLatencyMillis)
      Creates an instance of a Snapshot record class.
      Parameters:
      received - the value for the received record component
      dropped - the value for the dropped record component
      handlerErrors - the value for the handlerErrors record component
      perChannel - the value for the perChannel record component
      wallElapsedMillis - the value for the wallElapsedMillis record component
      achievedHz - the value for the achievedHz record component
      meanLatencyMillis - the value for the meanLatencyMillis record component
      p50LatencyMillis - the value for the p50LatencyMillis record component
      p95LatencyMillis - the value for the p95LatencyMillis record component
      p99LatencyMillis - the value for the p99LatencyMillis record component
      maxLatencyMillis - the value for the maxLatencyMillis record component
  • Method Details

    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • received

      public long received()
      Returns the value of the received record component.
      Returns:
      the value of the received record component
    • dropped

      public long dropped()
      Returns the value of the dropped record component.
      Returns:
      the value of the dropped record component
    • handlerErrors

      public long handlerErrors()
      Returns the value of the handlerErrors record component.
      Returns:
      the value of the handlerErrors record component
    • perChannel

      public Map<String,Long> perChannel()
      Returns the value of the perChannel record component.
      Returns:
      the value of the perChannel record component
    • wallElapsedMillis

      public long wallElapsedMillis()
      Returns the value of the wallElapsedMillis record component.
      Returns:
      the value of the wallElapsedMillis record component
    • achievedHz

      public double achievedHz()
      Returns the value of the achievedHz record component.
      Returns:
      the value of the achievedHz record component
    • meanLatencyMillis

      public double meanLatencyMillis()
      Returns the value of the meanLatencyMillis record component.
      Returns:
      the value of the meanLatencyMillis record component
    • p50LatencyMillis

      public long p50LatencyMillis()
      Returns the value of the p50LatencyMillis record component.
      Returns:
      the value of the p50LatencyMillis record component
    • p95LatencyMillis

      public long p95LatencyMillis()
      Returns the value of the p95LatencyMillis record component.
      Returns:
      the value of the p95LatencyMillis record component
    • p99LatencyMillis

      public long p99LatencyMillis()
      Returns the value of the p99LatencyMillis record component.
      Returns:
      the value of the p99LatencyMillis record component
    • maxLatencyMillis

      public long maxLatencyMillis()
      Returns the value of the maxLatencyMillis record component.
      Returns:
      the value of the maxLatencyMillis record component