Record Class Sample

java.lang.Object
java.lang.Record
org.acemq.workloads.Sample
Record Components:
at - when this reading was taken
elapsed - how long the run has been going, including warm-up
phase - what the run was doing
published - messages published so far in this phase
confirmed - messages the broker has confirmed
failed - publishes that errored, for a reason other than back pressure
refused - publishes this library declined unsent because publishing was paused or the broker was already blocked by a resource alarm — back pressure reported promptly, which is not a failure. Kept apart from failed because counting the two together made this load report 92,673 failures under a fault where Go, .NET, Python and Ruby reported about twenty, and a counter that means something different in each language cannot be compared across them. Go and .NET's standing loads split the same two the same way
consumed - messages the consumers have handled
publishRate - publishes per second since the previous reading
consumeRate - consumes per second since the previous reading
endToEnd - latency from when a message was due to when it was handled, cumulative
sendLag - how far behind their own schedule publishes are going out, cumulative
queueDepth - messages waiting, when the broker will say
blocked - whether the broker is refusing publishes for a resource alarm

public record Sample(Instant at, Duration elapsed, Sample.Phase phase, long published, long confirmed, long failed, long refused, long consumed, double publishRate, double consumeRate, LatencySummary endToEnd, LatencySummary sendLag, Long queueDepth, boolean blocked) extends Record
One reading taken while a workload is running.

A run takes minutes and reports at the end, which is the right shape for a pipeline and the wrong one for a person watching. These are what a live view draws, and they are readings rather than results: the rates are per-interval, so a stall shows as a trough here where the final report can only show a lower average.

The latency summaries are cumulative for the phase, not for the interval. HdrHistogram cannot subtract, and an interval percentile computed by resetting the recorder would corrupt the numbers the report is built from — so a live p99 that only rises is the honest one to show.

  • Constructor Details

    • Sample

      public Sample(Instant at, Duration elapsed, Sample.Phase phase, long published, long confirmed, long failed, long refused, long consumed, double publishRate, double consumeRate, LatencySummary endToEnd, LatencySummary sendLag, Long queueDepth, boolean blocked)
      Creates an instance of a Sample record class.
      Parameters:
      at - the value for the at record component
      elapsed - the value for the elapsed record component
      phase - the value for the phase record component
      published - the value for the published record component
      confirmed - the value for the confirmed record component
      failed - the value for the failed record component
      refused - the value for the refused record component
      consumed - the value for the consumed record component
      publishRate - the value for the publishRate record component
      consumeRate - the value for the consumeRate record component
      endToEnd - the value for the endToEnd record component
      sendLag - the value for the sendLag record component
      queueDepth - the value for the queueDepth record component
      blocked - the value for the blocked 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.
    • at

      public Instant at()
      Returns the value of the at record component.
      Returns:
      the value of the at record component
    • elapsed

      public Duration elapsed()
      Returns the value of the elapsed record component.
      Returns:
      the value of the elapsed record component
    • phase

      public Sample.Phase phase()
      Returns the value of the phase record component.
      Returns:
      the value of the phase record component
    • published

      public long published()
      Returns the value of the published record component.
      Returns:
      the value of the published record component
    • confirmed

      public long confirmed()
      Returns the value of the confirmed record component.
      Returns:
      the value of the confirmed record component
    • failed

      public long failed()
      Returns the value of the failed record component.
      Returns:
      the value of the failed record component
    • refused

      public long refused()
      Returns the value of the refused record component.
      Returns:
      the value of the refused record component
    • consumed

      public long consumed()
      Returns the value of the consumed record component.
      Returns:
      the value of the consumed record component
    • publishRate

      public double publishRate()
      Returns the value of the publishRate record component.
      Returns:
      the value of the publishRate record component
    • consumeRate

      public double consumeRate()
      Returns the value of the consumeRate record component.
      Returns:
      the value of the consumeRate record component
    • endToEnd

      public LatencySummary endToEnd()
      Returns the value of the endToEnd record component.
      Returns:
      the value of the endToEnd record component
    • sendLag

      public LatencySummary sendLag()
      Returns the value of the sendLag record component.
      Returns:
      the value of the sendLag record component
    • queueDepth

      public Long queueDepth()
      Returns the value of the queueDepth record component.
      Returns:
      the value of the queueDepth record component
    • blocked

      public boolean blocked()
      Returns the value of the blocked record component.
      Returns:
      the value of the blocked record component