java.lang.Object
net.i2p.router.JobQueueScaler.PreScaleSnapshot
- Enclosing class:
JobQueueScaler
Snapshot of metrics taken before scaling up. Used to evaluate if scaling actually helped.
Field Summary
FieldsModifier and TypeFieldDescription(package private) final longAverage job lag at the capture.(package private) final longWorst job lag at the capture.(package private) final intReady jobs at the capture.(package private) final intRunners in effect at the capture.(package private) final intRunners added by the scale event.(package private) final longWhen the state was captured.(package private) final longHeap in use at the capture.Constructor Summary
ConstructorsConstructorDescriptionPreScaleSnapshot(int runnerCount, int readyJobs, long maxLag, long avgLag, long usedMemory, int runnersAdded) Captures the queue state before a scaling decision.Method Summary
Field Details
timestamp
final long timestampWhen the state was captured.runnerCount
final int runnerCountRunners in effect at the capture.readyJobs
final int readyJobsReady jobs at the capture.maxLag
final long maxLagWorst job lag at the capture.avgLag
final long avgLagAverage job lag at the capture.usedMemory
final long usedMemoryHeap in use at the capture.runnersAdded
final int runnersAddedRunners 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 runningreadyJobs- the jobs ready to runmaxLag- the longest job lag, in millisecondsavgLag- the average job lag, in millisecondsusedMemory- the memory in use, in bytesrunnersAdded- the runners added so far