Record Class PeerNode.LoopStats

java.lang.Object
java.lang.Record
ai.badmonkey.agentspaces.peering.node.PeerNode.LoopStats
Record Components:
runs - loop runs: timer, event and direct (PeerNode.tick())
timerWakes - runs the loop's armed timer started (a deadline or the backstop)
eventWakes - runs a wake started (a frame, a change signal, a registration)
directRuns - runs of PeerNode.tick()
backstopRuns - runs that swept every participant because the backstop came due
backstopFoundWork - sweeps that found a participant reporting a deadline earlier than the one the loop held, or doing work it said fell due before it (NodeLoop.foundOverdue), with no wake (a missed wake, EL-Q-REL-03), over every participant
backstopFoundBy - the same, by participant name
participantThrows - runs of a participant that threw, by participant name (NL-4)
flushRuns - runs of the flush timer, armed only by an enqueue into an idle node (EL-B-01)
flushesWithFrames - flush runs that found at least one frame to send
slowRuns - loop runs over PeerNode.SLOW_RUN_NANOS of real time
failedRuns - participant runs that threw, over every participant
overruns - timer fires that found a run pending or running (§3.10)
latenessSamples - timer-started runs whose lateness is in the three figures below (the most recent 4,096)
latenessP50Nanos - the median of a timer-started run's start minus the deadline it was armed for
latenessP99Nanos - the 99th percentile of the same
latenessMaxNanos - the largest lateness since the node started
busyNanos - the real time loop runs took, summed
flushWaitSamples - flushes whose oldest frame's wait is in the two figures below (the most recent 4,096)
flushWaitP99Nanos - the 99th percentile of the oldest frame's wait from its enqueue to its flush (EL-B-04)
flushWaitMaxNanos - the largest such wait since the node started
generation - the loop's generation, bumped by each watchdog re-initialisation (§3.9)
backstopOnlyRuns - backstop runs in which no participant was due or asked; timer and event wakes less these are the runs that had work (core.idle.wakes, §5.4)
dueRuns - per participant, scheduled runs that called it because its deadline came
askedRuns - per participant, scheduled runs that called it because a wake asked it
wakeCalls - wakes raised, by who raised them: a participant's name, group:<id>[/<kind>] or all (the per-participant wake counters, srad/agentspaces-event-loop.md §10.21)
stretch - the stretch factor on local periods now, 1 for none (EL-O-04)
stretches - steps up of the stretch
restores - steps down of the stretch
refreshes - refresh actions run before a stretch applied, or before the first run after a re-initialisation that found a wire-visible deadline overdue (EL-O-05, WD-4)
stretchUnrefreshed - wire-visible deadlines whose stretch would have outrun their refresh, held to it (core.loop.stretch-unrefreshed, goal 0)
poolThreads - the loop pool's threads now, 0 on a source with none (core.loop.pool-threads)
poolMax - the loop pool's max, 0 on a source with none
wireVisible - the participants whose cadence a peer judges, which carry a refresh action (EL-O-07, EL-F-01)
Enclosing class:
PeerNode

public static record PeerNode.LoopStats(long runs, long timerWakes, long eventWakes, long directRuns, long backstopRuns, long backstopFoundWork, Map<String,Long> backstopFoundBy, Map<String,Long> participantThrows, long flushRuns, long flushesWithFrames, long slowRuns, long failedRuns, long overruns, long latenessSamples, long latenessP50Nanos, long latenessP99Nanos, long latenessMaxNanos, long busyNanos, long flushWaitSamples, long flushWaitP99Nanos, long flushWaitMaxNanos, long generation, long backstopOnlyRuns, Map<String,Long> dueRuns, Map<String,Long> askedRuns, Map<String,Long> wakeCalls, int stretch, long stretches, long restores, long refreshes, long stretchUnrefreshed, int poolThreads, int poolMax, List<String> wireVisible) extends Record
What this node's loop did since it started (srad/agentspaces-event-loop.md NL-6, EL-M-02). Phase 0 read the old ticker and flusher with the first of these counters; from phase 1 they read the node's loop and its flush timer, so the series before and after the event loop are the same series.
  • Constructor Details

    • LoopStats

      public LoopStats(long runs, long timerWakes, long eventWakes, long directRuns, long backstopRuns, long backstopFoundWork, Map<String,Long> backstopFoundBy, Map<String,Long> participantThrows, long flushRuns, long flushesWithFrames, long slowRuns, long failedRuns, long overruns, long latenessSamples, long latenessP50Nanos, long latenessP99Nanos, long latenessMaxNanos, long busyNanos, long flushWaitSamples, long flushWaitP99Nanos, long flushWaitMaxNanos, long generation, long backstopOnlyRuns, Map<String,Long> dueRuns, Map<String,Long> askedRuns, Map<String,Long> wakeCalls, int stretch, long stretches, long restores, long refreshes, long stretchUnrefreshed, int poolThreads, int poolMax, List<String> wireVisible)
      Creates an instance of a LoopStats record class.
      Parameters:
      runs - the value for the runs record component
      timerWakes - the value for the timerWakes record component
      eventWakes - the value for the eventWakes record component
      directRuns - the value for the directRuns record component
      backstopRuns - the value for the backstopRuns record component
      backstopFoundWork - the value for the backstopFoundWork record component
      backstopFoundBy - the value for the backstopFoundBy record component
      participantThrows - the value for the participantThrows record component
      flushRuns - the value for the flushRuns record component
      flushesWithFrames - the value for the flushesWithFrames record component
      slowRuns - the value for the slowRuns record component
      failedRuns - the value for the failedRuns record component
      overruns - the value for the overruns record component
      latenessSamples - the value for the latenessSamples record component
      latenessP50Nanos - the value for the latenessP50Nanos record component
      latenessP99Nanos - the value for the latenessP99Nanos record component
      latenessMaxNanos - the value for the latenessMaxNanos record component
      busyNanos - the value for the busyNanos record component
      flushWaitSamples - the value for the flushWaitSamples record component
      flushWaitP99Nanos - the value for the flushWaitP99Nanos record component
      flushWaitMaxNanos - the value for the flushWaitMaxNanos record component
      generation - the value for the generation record component
      backstopOnlyRuns - the value for the backstopOnlyRuns record component
      dueRuns - the value for the dueRuns record component
      askedRuns - the value for the askedRuns record component
      wakeCalls - the value for the wakeCalls record component
      stretch - the value for the stretch record component
      stretches - the value for the stretches record component
      restores - the value for the restores record component
      refreshes - the value for the refreshes record component
      stretchUnrefreshed - the value for the stretchUnrefreshed record component
      poolThreads - the value for the poolThreads record component
      poolMax - the value for the poolMax record component
      wireVisible - the value for the wireVisible record component
  • Method Details

    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components 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.
    • runs

      public long runs()
      Returns the value of the runs record component.
      Returns:
      the value of the runs record component
    • timerWakes

      public long timerWakes()
      Returns the value of the timerWakes record component.
      Returns:
      the value of the timerWakes record component
    • eventWakes

      public long eventWakes()
      Returns the value of the eventWakes record component.
      Returns:
      the value of the eventWakes record component
    • directRuns

      public long directRuns()
      Returns the value of the directRuns record component.
      Returns:
      the value of the directRuns record component
    • backstopRuns

      public long backstopRuns()
      Returns the value of the backstopRuns record component.
      Returns:
      the value of the backstopRuns record component
    • backstopFoundWork

      public long backstopFoundWork()
      Returns the value of the backstopFoundWork record component.
      Returns:
      the value of the backstopFoundWork record component
    • backstopFoundBy

      public Map<String,Long> backstopFoundBy()
      Returns the value of the backstopFoundBy record component.
      Returns:
      the value of the backstopFoundBy record component
    • participantThrows

      public Map<String,Long> participantThrows()
      Returns the value of the participantThrows record component.
      Returns:
      the value of the participantThrows record component
    • flushRuns

      public long flushRuns()
      Returns the value of the flushRuns record component.
      Returns:
      the value of the flushRuns record component
    • flushesWithFrames

      public long flushesWithFrames()
      Returns the value of the flushesWithFrames record component.
      Returns:
      the value of the flushesWithFrames record component
    • slowRuns

      public long slowRuns()
      Returns the value of the slowRuns record component.
      Returns:
      the value of the slowRuns record component
    • failedRuns

      public long failedRuns()
      Returns the value of the failedRuns record component.
      Returns:
      the value of the failedRuns record component
    • overruns

      public long overruns()
      Returns the value of the overruns record component.
      Returns:
      the value of the overruns record component
    • latenessSamples

      public long latenessSamples()
      Returns the value of the latenessSamples record component.
      Returns:
      the value of the latenessSamples record component
    • latenessP50Nanos

      public long latenessP50Nanos()
      Returns the value of the latenessP50Nanos record component.
      Returns:
      the value of the latenessP50Nanos record component
    • latenessP99Nanos

      public long latenessP99Nanos()
      Returns the value of the latenessP99Nanos record component.
      Returns:
      the value of the latenessP99Nanos record component
    • latenessMaxNanos

      public long latenessMaxNanos()
      Returns the value of the latenessMaxNanos record component.
      Returns:
      the value of the latenessMaxNanos record component
    • busyNanos

      public long busyNanos()
      Returns the value of the busyNanos record component.
      Returns:
      the value of the busyNanos record component
    • flushWaitSamples

      public long flushWaitSamples()
      Returns the value of the flushWaitSamples record component.
      Returns:
      the value of the flushWaitSamples record component
    • flushWaitP99Nanos

      public long flushWaitP99Nanos()
      Returns the value of the flushWaitP99Nanos record component.
      Returns:
      the value of the flushWaitP99Nanos record component
    • flushWaitMaxNanos

      public long flushWaitMaxNanos()
      Returns the value of the flushWaitMaxNanos record component.
      Returns:
      the value of the flushWaitMaxNanos record component
    • generation

      public long generation()
      Returns the value of the generation record component.
      Returns:
      the value of the generation record component
    • backstopOnlyRuns

      public long backstopOnlyRuns()
      Returns the value of the backstopOnlyRuns record component.
      Returns:
      the value of the backstopOnlyRuns record component
    • dueRuns

      public Map<String,Long> dueRuns()
      Returns the value of the dueRuns record component.
      Returns:
      the value of the dueRuns record component
    • askedRuns

      public Map<String,Long> askedRuns()
      Returns the value of the askedRuns record component.
      Returns:
      the value of the askedRuns record component
    • wakeCalls

      public Map<String,Long> wakeCalls()
      Returns the value of the wakeCalls record component.
      Returns:
      the value of the wakeCalls record component
    • stretch

      public int stretch()
      Returns the value of the stretch record component.
      Returns:
      the value of the stretch record component
    • stretches

      public long stretches()
      Returns the value of the stretches record component.
      Returns:
      the value of the stretches record component
    • restores

      public long restores()
      Returns the value of the restores record component.
      Returns:
      the value of the restores record component
    • refreshes

      public long refreshes()
      Returns the value of the refreshes record component.
      Returns:
      the value of the refreshes record component
    • stretchUnrefreshed

      public long stretchUnrefreshed()
      Returns the value of the stretchUnrefreshed record component.
      Returns:
      the value of the stretchUnrefreshed record component
    • poolThreads

      public int poolThreads()
      Returns the value of the poolThreads record component.
      Returns:
      the value of the poolThreads record component
    • poolMax

      public int poolMax()
      Returns the value of the poolMax record component.
      Returns:
      the value of the poolMax record component
    • wireVisible

      public List<String> wireVisible()
      Returns the value of the wireVisible record component.
      Returns:
      the value of the wireVisible record component