Record Class ScenarioReport.QueueResult

java.lang.Object
java.lang.Record
org.acemq.workloads.scenario.ScenarioReport.QueueResult
Record Components:
name - the queue
type - what kind of queue it was
consumers - how many consumers were on it
consumed - how many messages they handled
endToEnd - latency from when a message was due to when it was handled
depthAtStart - what was waiting when measurement began
depthAtEnd - what was waiting when it ended
Enclosing class:
ScenarioReport

public static record ScenarioReport.QueueResult(String name, QueueType type, int consumers, long consumed, LatencySummary endToEnd, Long depthAtStart, Long depthAtEnd, Expect expectations) extends Record
What one queue saw.
  • Constructor Details

    • QueueResult

      public QueueResult(String name, QueueType type, int consumers, long consumed, LatencySummary endToEnd, Long depthAtStart, Long depthAtEnd, Expect expectations)
      Creates an instance of a QueueResult record class.
      Parameters:
      name - the value for the name record component
      type - the value for the type record component
      consumers - the value for the consumers record component
      consumed - the value for the consumed record component
      endToEnd - the value for the endToEnd record component
      depthAtStart - the value for the depthAtStart record component
      depthAtEnd - the value for the depthAtEnd record component
      expectations - the value for the expectations record component
  • Method Details

    • retainsMessages

      public boolean retainsMessages()
      Whether this kind of queue keeps messages after they have been read.

      A stream does: consumers move an offset and nothing is removed, so its "depth" is the length of the log rather than a backlog. Treating that as a backlog reports a stream that kept up perfectly as one whose consumers fell behind, which is exactly backwards and was doing so until this existed.

      Returns:
      whether depth means retention rather than a queue of unhandled work
    • consumeRate

      public double consumeRate(Duration duration)
      Parameters:
      duration - how long the measured window was
      Returns:
      messages a second handled
    • grew

      public boolean grew()
      Returns:
      whether unhandled work accumulated over the measured window
    • toString

      public final 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.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • type

      public QueueType type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • consumers

      public int consumers()
      Returns the value of the consumers record component.
      Returns:
      the value of the consumers record component
    • consumed

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

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

      public Long depthAtStart()
      Returns the value of the depthAtStart record component.
      Returns:
      the value of the depthAtStart record component
    • depthAtEnd

      public Long depthAtEnd()
      Returns the value of the depthAtEnd record component.
      Returns:
      the value of the depthAtEnd record component
    • expectations

      public Expect expectations()
      Returns the value of the expectations record component.
      Returns:
      the value of the expectations record component