Class StabilityDetector

java.lang.Object
io.nosqlbench.scenarios.simframe.stabilization.StabilityDetector
All Implemented Interfaces:
Runnable

public class StabilityDetector extends Object implements Runnable
  • Constructor Summary

    Constructors
    Constructor
    Description
    StabilityDetector(double timeSliceSeconds, double minThreshold, DoubleSupplier source, Supplier<String> summary, int... windows)
    Configure a stability checker that reads values from a source on some timed loop, computes the streaming standard deviation, computes the ratio of stabilization between values from longer windows to shorter windows, and returns from its run method once the computed ratio is higher than the min threshold.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    apply(double value)
     
    void
    run()
    This run method is meant to be reused, since it resets internal state each time
    stabilitySummary(double[] stddev)
     
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • StabilityDetector

      public StabilityDetector(double timeSliceSeconds, double minThreshold, DoubleSupplier source, Supplier<String> summary, int... windows)
      Configure a stability checker that reads values from a source on some timed loop, computes the streaming standard deviation, computes the ratio of stabilization between values from longer windows to shorter windows, and returns from its run method once the computed ratio is higher than the min threshold.
      Parameters:
      timeSliceSeconds - How frequently to gather a sample. 0.1 is recommended to start
      minThreshold - The unit interval fractional stability measurement which must be met at a minimum in order to stop polling for stability
      source - The source of data to be added to the streaming std dev computations
      windows - The size of each window in the set of diminishing sizes. These contain the last N samples by size, respectively.
  • Method Details

    • apply

      public void apply(double value)
    • run

      public void run()
      This run method is meant to be reused, since it resets internal state each time
      Specified by:
      run in interface Runnable
    • stabilitySummary

      public String stabilitySummary(double[] stddev)
    • toString

      public String toString()
      Overrides:
      toString in class Object