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 observed
callsSucceeded - число успешных завершений / number of successful call completions
callsTimedOut - число timeout-завершений / number of timeout completions
callsFailed - число локальных call failures / number of local call failures
remoteErrors - число structured remote-error событий / number of structured remote-error events
channelUps - число channel-up переходов / number of channel-up transitions
channelDowns - число channel-down переходов / number of channel-down transitions
drainStarts - число drain-start событий / number of drain-start events
drainFinishes - число drain-finished событий / number of drain-finished events
reconnectAttempts - число reconnect attempts / number of reconnect attempts
reconnectSuccesses - число успешных reconnect / number of reconnect successes
reconnectFailures - число failed reconnect / number of reconnect failures
protocolHandshakeStarts - число handshake-start событий / number of handshake-start events
protocolHandshakeSuccesses - число успешных handshake / number of successful handshakes
protocolHandshakeFailures - число 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 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 a RpcMetricsSnapshot record class.
      Parameters:
      callsStarted - the value for the callsStarted record component
      callsSucceeded - the value for the callsSucceeded record component
      callsTimedOut - the value for the callsTimedOut record component
      callsFailed - the value for the callsFailed record component
      remoteErrors - the value for the remoteErrors record component
      channelUps - the value for the channelUps record component
      channelDowns - the value for the channelDowns record component
      drainStarts - the value for the drainStarts record component
      drainFinishes - the value for the drainFinishes record component
      reconnectAttempts - the value for the reconnectAttempts record component
      reconnectSuccesses - the value for the reconnectSuccesses record component
      reconnectFailures - the value for the reconnectFailures record component
      protocolHandshakeStarts - the value for the protocolHandshakeStarts record component
      protocolHandshakeSuccesses - the value for the protocolHandshakeSuccesses record component
      protocolHandshakeFailures - the value for the protocolHandshakeFailures record 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:
      true when all counters are zero
    • deltaSince

      public RpcMetricsSnapshot deltaSince(RpcMetricsSnapshot baseline)
      Возвращает 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

      public String renderTextReport()
      Рендерит snapshot как читаемый multi-line report.

      Renders the snapshot as a readable multi-line report.

      Returns:
      text report
    • renderJsonReport

      public String renderJsonReport()
      Рендерит snapshot как compact JSON document.

      Renders the snapshot as a compact JSON document.

      Returns:
      JSON report
    • 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. All components in this record class are compared with the compare method from their corresponding wrapper classes.
      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.
    • callsStarted

      public long callsStarted()
      Returns the value of the callsStarted record component.
      Returns:
      the value of the callsStarted record component
    • callsSucceeded

      public long callsSucceeded()
      Returns the value of the callsSucceeded record component.
      Returns:
      the value of the callsSucceeded record component
    • callsTimedOut

      public long callsTimedOut()
      Returns the value of the callsTimedOut record component.
      Returns:
      the value of the callsTimedOut record component
    • callsFailed

      public long callsFailed()
      Returns the value of the callsFailed record component.
      Returns:
      the value of the callsFailed record component
    • remoteErrors

      public long remoteErrors()
      Returns the value of the remoteErrors record component.
      Returns:
      the value of the remoteErrors record component
    • channelUps

      public long channelUps()
      Returns the value of the channelUps record component.
      Returns:
      the value of the channelUps record component
    • channelDowns

      public long channelDowns()
      Returns the value of the channelDowns record component.
      Returns:
      the value of the channelDowns record component
    • drainStarts

      public long drainStarts()
      Returns the value of the drainStarts record component.
      Returns:
      the value of the drainStarts record component
    • drainFinishes

      public long drainFinishes()
      Returns the value of the drainFinishes record component.
      Returns:
      the value of the drainFinishes record component
    • reconnectAttempts

      public long reconnectAttempts()
      Returns the value of the reconnectAttempts record component.
      Returns:
      the value of the reconnectAttempts record component
    • reconnectSuccesses

      public long reconnectSuccesses()
      Returns the value of the reconnectSuccesses record component.
      Returns:
      the value of the reconnectSuccesses record component
    • reconnectFailures

      public long reconnectFailures()
      Returns the value of the reconnectFailures record component.
      Returns:
      the value of the reconnectFailures record component
    • protocolHandshakeStarts

      public long protocolHandshakeStarts()
      Returns the value of the protocolHandshakeStarts record component.
      Returns:
      the value of the protocolHandshakeStarts record component
    • protocolHandshakeSuccesses

      public long protocolHandshakeSuccesses()
      Returns the value of the protocolHandshakeSuccesses record component.
      Returns:
      the value of the protocolHandshakeSuccesses record component
    • protocolHandshakeFailures

      public long protocolHandshakeFailures()
      Returns the value of the protocolHandshakeFailures record component.
      Returns:
      the value of the protocolHandshakeFailures record component