Package org.acemq.workloads.scenario
Record Class ScenarioSample
java.lang.Object
java.lang.Record
org.acemq.workloads.scenario.ScenarioSample
- Record Components:
at- when this reading was takenelapsed- how long the run has been goingphase- what the run was doingproducers- a reading per producerqueues- a reading per queueblocked- 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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordWhat one producer is doing.static final recordWhat one queue is doing. -
Constructor Summary
ConstructorsConstructorDescriptionScenarioSample(Instant at, Duration elapsed, Sample.Phase phase, List<ScenarioSample.ProducerSample> producers, List<ScenarioSample.QueueSample> queues, boolean blocked) Creates an instance of aScenarioSamplerecord class. -
Method Summary
Modifier and TypeMethodDescriptionat()Returns the value of theatrecord component.booleanblocked()Returns the value of theblockedrecord component.elapsed()Returns the value of theelapsedrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.phase()Returns the value of thephaserecord component.Returns the value of theproducersrecord component.queues()Returns the value of thequeuesrecord component.toString()Returns a string representation of this record class.doublelongdouble
-
Constructor Details
-
ScenarioSample
public ScenarioSample(Instant at, Duration elapsed, Sample.Phase phase, List<ScenarioSample.ProducerSample> producers, List<ScenarioSample.QueueSample> queues, boolean blocked) Creates an instance of aScenarioSamplerecord class.- Parameters:
at- the value for theatrecord componentelapsed- the value for theelapsedrecord componentphase- the value for thephaserecord componentproducers- the value for theproducersrecord componentqueues- the value for thequeuesrecord componentblocked- the value for theblockedrecord component
-
-
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
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
at
Returns the value of theatrecord component.- Returns:
- the value of the
atrecord component
-
elapsed
Returns the value of theelapsedrecord component.- Returns:
- the value of the
elapsedrecord component
-
phase
Returns the value of thephaserecord component.- Returns:
- the value of the
phaserecord component
-
producers
Returns the value of theproducersrecord component.- Returns:
- the value of the
producersrecord component
-
queues
Returns the value of thequeuesrecord component.- Returns:
- the value of the
queuesrecord component
-
blocked
public boolean blocked()Returns the value of theblockedrecord component.- Returns:
- the value of the
blockedrecord component
-