java.lang.Object
net.i2p.router.Tuner.BaseParam
net.i2p.router.Tuner.TestJobMaxQueuedParam
All Implemented Interfaces:
Tuner.TunableParam
Enclosing class:
Tuner

private class Tuner.TestJobMaxQueuedParamextends Tuner.BaseParam
Tunes max concurrent test jobs. Grows while test batches are turned away for want of a slot, and while tests are failing — the pool needs detection and replacement of dead tunnels most at that moment, so shedding test concurrency then is self-harm. Primary signal: tunnel.testBatchDenied (event count).
  • Constructor Details

    • TestJobMaxQueuedParam

      TestJobMaxQueuedParam()
      Creates the parameter that caps concurrent tunnel test jobs.
  • Method Details

    • applyValue

      protected void applyValue(int value)
      Description copied from class: Tuner.BaseParam
      Apply the tunable value to the router configuration.
      Specified by:
      applyValue in class Tuner.BaseParam
      Parameters:
      value - the tunable value to apply to router configuration
    • getRuntimeValue

      protected int getRuntimeValue()
      Description copied from class: Tuner.BaseParam
      Current runtime value read from the router configuration.
      Specified by:
      getRuntimeValue in class Tuner.BaseParam
      Returns:
      current runtime value read from router config
    • getObservedStat

      protected double getObservedStat(RouterContext ctx)
      Denial events this cycle, not the stat's mean value — the stat is a counter, so its average is a constant 1 whenever anything was denied.
      Specified by:
      getObservedStat in class Tuner.BaseParam
      Parameters:
      ctx - router context, never null
      Returns:
      observed stat value for autotuning
    • computeTarget

      protected int computeTarget(double observed)
      Description copied from class: Tuner.BaseParam
      Target tunable value computed from the observed stat.
      Specified by:
      computeTarget in class Tuner.BaseParam
      Parameters:
      observed - current stat value
      Returns:
      target tunable value