java.lang.Object
net.i2p.router.JobQueueScaler.PreScaleSnapshot
Enclosing class:
JobQueueScaler

private static class JobQueueScaler.PreScaleSnapshotextends Object
Snapshot of metrics taken before scaling up. Used to evaluate if scaling actually helped.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) final long
    Average job lag at the capture.
    (package private) final long
    Worst job lag at the capture.
    (package private) final int
    Ready jobs at the capture.
    (package private) final int
    Runners in effect at the capture.
    (package private) final int
    Runners added by the scale event.
    (package private) final long
    When the state was captured.
    (package private) final long
    Heap in use at the capture.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PreScaleSnapshot(int runnerCount, int readyJobs, long maxLag, long avgLag, long usedMemory, int runnersAdded)
    Captures the queue state before a scaling decision.
  • Method Summary

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • timestamp

      final long timestamp
      When the state was captured.
    • runnerCount

      final int runnerCount
      Runners in effect at the capture.
    • readyJobs

      final int readyJobs
      Ready jobs at the capture.
    • maxLag

      final long maxLag
      Worst job lag at the capture.
    • avgLag

      final long avgLag
      Average job lag at the capture.
    • usedMemory

      final long usedMemory
      Heap in use at the capture.
    • runnersAdded

      final int runnersAdded
      Runners added by the scale event.
  • Constructor Details

    • PreScaleSnapshot

      PreScaleSnapshot(int runnerCount, int readyJobs, long maxLag, long avgLag, long usedMemory, int runnersAdded)
      Captures the queue state before a scaling decision.
      Parameters:
      runnerCount - the job runners then running
      readyJobs - the jobs ready to run
      maxLag - the longest job lag, in milliseconds
      avgLag - the average job lag, in milliseconds
      usedMemory - the memory in use, in bytes
      runnersAdded - the runners added so far