Record Class ScenarioSample

java.lang.Object
java.lang.Record
org.acemq.workloads.scenario.ScenarioSample
Record Components:
at - when this reading was taken
elapsed - how long the run has been going
phase - what the run was doing
producers - a reading per producer
queues - a reading per queue
blocked - whether the broker is refusing publishes for a resource alarm

public record ScenarioSample(Instant at, Duration elapsed, Sample.Phase phase, List<ScenarioSample.ProducerSample> producers, List<ScenarioSample.QueueSample> queues, boolean blocked) extends Record
One reading of a whole scenario, node by node.

A single pair of numbers cannot describe a graph. Total throughput looks healthy while one leg of a fan-out is falling behind, and the moment worth seeing is exactly the one where two queues stop agreeing with each other — so every queue and every producer reports separately.

  • Constructor Details

  • Method Details

    • totalPublishRate

      public double totalPublishRate()
      Returns:
      everything published a second, across every producer
    • totalConsumeRate

      public double totalConsumeRate()
      Returns:
      everything consumed a second, across every queue
    • totalDepth

      public long totalDepth()
      Returns:
      every message waiting anywhere, when the depths could be read
    • 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
    • producers

      public List<ScenarioSample.ProducerSample> producers()
      Returns the value of the producers record component.
      Returns:
      the value of the producers record component
    • queues

      public List<ScenarioSample.QueueSample> queues()
      Returns the value of the queues record component.
      Returns:
      the value of the queues record component
    • blocked

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