Record Class RpcMetricsSnapshot
java.lang.Object
java.lang.Record
ru.pathcreator.pyc.rpc.metrics.RpcMetricsSnapshot
- Record Components:
callsStarted- число call-start событий / number of call-start events observedcallsSucceeded- число успешных завершений / number of successful call completionscallsTimedOut- число timeout-завершений / number of timeout completionscallsFailed- число локальных call failures / number of local call failuresremoteErrors- число structured remote-error событий / number of structured remote-error eventschannelUps- число channel-up переходов / number of channel-up transitionschannelDowns- число channel-down переходов / number of channel-down transitionsdrainStarts- число drain-start событий / number of drain-start eventsdrainFinishes- число drain-finished событий / number of drain-finished eventsreconnectAttempts- число reconnect attempts / number of reconnect attemptsreconnectSuccesses- число успешных reconnect / number of reconnect successesreconnectFailures- число failed reconnect / number of reconnect failuresprotocolHandshakeStarts- число handshake-start событий / number of handshake-start eventsprotocolHandshakeSuccesses- число успешных handshake / number of successful handshakesprotocolHandshakeFailures- число failed handshake / number of failed handshakes
public record RpcMetricsSnapshot(long callsStarted, long callsSucceeded, long callsTimedOut, long callsFailed, long remoteErrors, long channelUps, long channelDowns, long drainStarts, long drainFinishes, long reconnectAttempts, long reconnectSuccesses, long reconnectFailures, long protocolHandshakeStarts, long protocolHandshakeSuccesses, long protocolHandshakeFailures)
extends Record
Immutable snapshot listener-based RPC метрик.
Immutable snapshot of listener-based RPC metrics.
-
Constructor Summary
ConstructorsConstructorDescriptionRpcMetricsSnapshot(long callsStarted, long callsSucceeded, long callsTimedOut, long callsFailed, long remoteErrors, long channelUps, long channelDowns, long drainStarts, long drainFinishes, long reconnectAttempts, long reconnectSuccesses, long reconnectFailures, long protocolHandshakeStarts, long protocolHandshakeSuccesses, long protocolHandshakeFailures) Creates an instance of aRpcMetricsSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thecallsFailedrecord component.longReturns the value of thecallsStartedrecord component.longReturns the value of thecallsSucceededrecord component.longReturns the value of thecallsTimedOutrecord component.longReturns the value of thechannelDownsrecord component.longReturns the value of thechannelUpsrecord component.longВозвращает суммарное число terminal local call outcomes.deltaSince(RpcMetricsSnapshot baseline) Возвращает delta-snapshot как разницу между текущим snapshot и baseline.longReturns the value of thedrainFinishesrecord component.longReturns the value of thedrainStartsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisEmpty()Возвращает, равны ли все счетчики в snapshot нулю.longReturns the value of theprotocolHandshakeFailuresrecord component.longReturns the value of theprotocolHandshakeStartsrecord component.longReturns the value of theprotocolHandshakeSuccessesrecord component.longReturns the value of thereconnectAttemptsrecord component.longReturns the value of thereconnectFailuresrecord component.longReturns the value of thereconnectSuccessesrecord component.longReturns the value of theremoteErrorsrecord component.Рендерит snapshot как compact JSON document.Рендерит snapshot как читаемый multi-line report.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RpcMetricsSnapshot
public RpcMetricsSnapshot(long callsStarted, long callsSucceeded, long callsTimedOut, long callsFailed, long remoteErrors, long channelUps, long channelDowns, long drainStarts, long drainFinishes, long reconnectAttempts, long reconnectSuccesses, long reconnectFailures, long protocolHandshakeStarts, long protocolHandshakeSuccesses, long protocolHandshakeFailures) Creates an instance of aRpcMetricsSnapshotrecord class.- Parameters:
callsStarted- the value for thecallsStartedrecord componentcallsSucceeded- the value for thecallsSucceededrecord componentcallsTimedOut- the value for thecallsTimedOutrecord componentcallsFailed- the value for thecallsFailedrecord componentremoteErrors- the value for theremoteErrorsrecord componentchannelUps- the value for thechannelUpsrecord componentchannelDowns- the value for thechannelDownsrecord componentdrainStarts- the value for thedrainStartsrecord componentdrainFinishes- the value for thedrainFinishesrecord componentreconnectAttempts- the value for thereconnectAttemptsrecord componentreconnectSuccesses- the value for thereconnectSuccessesrecord componentreconnectFailures- the value for thereconnectFailuresrecord componentprotocolHandshakeStarts- the value for theprotocolHandshakeStartsrecord componentprotocolHandshakeSuccesses- the value for theprotocolHandshakeSuccessesrecord componentprotocolHandshakeFailures- the value for theprotocolHandshakeFailuresrecord component
-
-
Method Details
-
completedCalls
public long completedCalls()Возвращает суммарное число terminal local call outcomes.Returns the total number of terminal local call outcomes represented by this snapshot.
- Returns:
- total number of completed local call outcomes
-
isEmpty
public boolean isEmpty()Возвращает, равны ли все счетчики в snapshot нулю.Returns whether all counters in this snapshot are zero.
- Returns:
truewhen all counters are zero
-
deltaSince
Возвращает delta-snapshot как разницу между текущим snapshot и baseline.Returns a delta snapshot produced by subtracting the provided baseline from this snapshot.
- Parameters:
baseline- более ранний snapshot / earlier snapshot- Returns:
- delta snapshot
-
renderTextReport
Рендерит snapshot как читаемый multi-line report.Renders the snapshot as a readable multi-line report.
- Returns:
- text report
-
renderJsonReport
Рендерит snapshot как compact JSON document.Renders the snapshot as a compact JSON document.
- Returns:
- JSON report
-
toString
-
hashCode
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
callsStarted
public long callsStarted()Returns the value of thecallsStartedrecord component.- Returns:
- the value of the
callsStartedrecord component
-
callsSucceeded
public long callsSucceeded()Returns the value of thecallsSucceededrecord component.- Returns:
- the value of the
callsSucceededrecord component
-
callsTimedOut
public long callsTimedOut()Returns the value of thecallsTimedOutrecord component.- Returns:
- the value of the
callsTimedOutrecord component
-
callsFailed
public long callsFailed()Returns the value of thecallsFailedrecord component.- Returns:
- the value of the
callsFailedrecord component
-
remoteErrors
public long remoteErrors()Returns the value of theremoteErrorsrecord component.- Returns:
- the value of the
remoteErrorsrecord component
-
channelUps
public long channelUps()Returns the value of thechannelUpsrecord component.- Returns:
- the value of the
channelUpsrecord component
-
channelDowns
public long channelDowns()Returns the value of thechannelDownsrecord component.- Returns:
- the value of the
channelDownsrecord component
-
drainStarts
public long drainStarts()Returns the value of thedrainStartsrecord component.- Returns:
- the value of the
drainStartsrecord component
-
drainFinishes
public long drainFinishes()Returns the value of thedrainFinishesrecord component.- Returns:
- the value of the
drainFinishesrecord component
-
reconnectAttempts
public long reconnectAttempts()Returns the value of thereconnectAttemptsrecord component.- Returns:
- the value of the
reconnectAttemptsrecord component
-
reconnectSuccesses
public long reconnectSuccesses()Returns the value of thereconnectSuccessesrecord component.- Returns:
- the value of the
reconnectSuccessesrecord component
-
reconnectFailures
public long reconnectFailures()Returns the value of thereconnectFailuresrecord component.- Returns:
- the value of the
reconnectFailuresrecord component
-
protocolHandshakeStarts
public long protocolHandshakeStarts()Returns the value of theprotocolHandshakeStartsrecord component.- Returns:
- the value of the
protocolHandshakeStartsrecord component
-
protocolHandshakeSuccesses
public long protocolHandshakeSuccesses()Returns the value of theprotocolHandshakeSuccessesrecord component.- Returns:
- the value of the
protocolHandshakeSuccessesrecord component
-
protocolHandshakeFailures
public long protocolHandshakeFailures()Returns the value of theprotocolHandshakeFailuresrecord component.- Returns:
- the value of the
protocolHandshakeFailuresrecord component
-