Package org.acemq.workloads
Record Class Sample
java.lang.Object
java.lang.Record
org.acemq.workloads.Sample
- Record Components:
at- when this reading was takenelapsed- how long the run has been going, including warm-upphase- what the run was doingpublished- messages published so far in this phaseconfirmed- messages the broker has confirmedfailed- publishes that errored, for a reason other than back pressurerefused- 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 fromfailedbecause 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 wayconsumed- messages the consumers have handledpublishRate- publishes per second since the previous readingconsumeRate- consumes per second since the previous readingendToEnd- latency from when a message was due to when it was handled, cumulativesendLag- how far behind their own schedule publishes are going out, cumulativequeueDepth- messages waiting, when the broker will sayblocked- 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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumWhat a run is doing when a reading is taken. -
Constructor Summary
ConstructorsConstructorDescriptionSample(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 aSamplerecord class. -
Method Summary
Modifier and TypeMethodDescriptionat()Returns the value of theatrecord component.booleanblocked()Returns the value of theblockedrecord component.longReturns the value of theconfirmedrecord component.longconsumed()Returns the value of theconsumedrecord component.doubleReturns the value of theconsumeRaterecord component.elapsed()Returns the value of theelapsedrecord component.endToEnd()Returns the value of theendToEndrecord component.final booleanIndicates whether some other object is "equal to" this one.longfailed()Returns the value of thefailedrecord component.final inthashCode()Returns a hash code value for this object.phase()Returns the value of thephaserecord component.longReturns the value of thepublishedrecord component.doubleReturns the value of thepublishRaterecord component.Returns the value of thequeueDepthrecord component.longrefused()Returns the value of therefusedrecord component.sendLag()Returns the value of thesendLagrecord component.toString()Returns a string representation of this record class.
-
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 aSamplerecord class.- Parameters:
at- the value for theatrecord componentelapsed- the value for theelapsedrecord componentphase- the value for thephaserecord componentpublished- the value for thepublishedrecord componentconfirmed- the value for theconfirmedrecord componentfailed- the value for thefailedrecord componentrefused- the value for therefusedrecord componentconsumed- the value for theconsumedrecord componentpublishRate- the value for thepublishRaterecord componentconsumeRate- the value for theconsumeRaterecord componentendToEnd- the value for theendToEndrecord componentsendLag- the value for thesendLagrecord componentqueueDepth- the value for thequeueDepthrecord componentblocked- the value for theblockedrecord component
-
-
Method Details
-
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
-
published
public long published()Returns the value of thepublishedrecord component.- Returns:
- the value of the
publishedrecord component
-
confirmed
public long confirmed()Returns the value of theconfirmedrecord component.- Returns:
- the value of the
confirmedrecord component
-
failed
public long failed()Returns the value of thefailedrecord component.- Returns:
- the value of the
failedrecord component
-
refused
public long refused()Returns the value of therefusedrecord component.- Returns:
- the value of the
refusedrecord component
-
consumed
public long consumed()Returns the value of theconsumedrecord component.- Returns:
- the value of the
consumedrecord component
-
publishRate
public double publishRate()Returns the value of thepublishRaterecord component.- Returns:
- the value of the
publishRaterecord component
-
consumeRate
public double consumeRate()Returns the value of theconsumeRaterecord component.- Returns:
- the value of the
consumeRaterecord component
-
endToEnd
Returns the value of theendToEndrecord component.- Returns:
- the value of the
endToEndrecord component
-
sendLag
Returns the value of thesendLagrecord component.- Returns:
- the value of the
sendLagrecord component
-
queueDepth
Returns the value of thequeueDepthrecord component.- Returns:
- the value of the
queueDepthrecord component
-
blocked
public boolean blocked()Returns the value of theblockedrecord component.- Returns:
- the value of the
blockedrecord component
-