Class Stats

java.lang.Object
io.aleph.dirigiste.Stats

public class Stats extends Object
  • Field Details

    • EMPTY

      public static final Stats EMPTY
  • Constructor Details

    • Stats

      public Stats(EnumSet<Stats.Metric> metrics, int numWorkers, double[] utilizations, double[] taskArrivalRates, double[] taskCompletionRates, double[] taskRejectionRates, long[] queueLengths, long[] queueLatencies, long[] taskLatencies)
  • Method Details

    • lerp

      public static double lerp(long low, long high, double t)
    • lerp

      public static double lerp(double low, double high, double t)
    • lerp

      public static double lerp(long[] vals, double t)
    • lerp

      public static double lerp(double[] vals, double t)
    • mean

      public static double mean(double[] vals)
    • mean

      public static double mean(long[] vals)
    • getMetrics

      public EnumSet<Stats.Metric> getMetrics()
      Returns:
      the provided metrics
    • getNumWorkers

      public int getNumWorkers()
      Returns:
      the number of active workers in the pool.
    • getMeanUtilization

      public double getMeanUtilization()
      Returns:
      the mean utilization of the workers as a value between 0 and 1.
    • getUtilization

      public double getUtilization(double quantile)
      Parameters:
      quantile - the point within the distribution to look up, 0.5 returns the median, 0.9 the 90th percentile
      Returns:
      the utilization of the workers as a value between 0 and 1
    • getMeanTaskArrivalRate

      public double getMeanTaskArrivalRate()
      Returns:
      the mean task arrival rate of the executor, in tasks per second
    • getTaskArrivalRate

      public double getTaskArrivalRate(double quantile)
      Parameters:
      quantile - the point within the distribution to look up, 0.5 returns the median, 0.9 the 90th percentile
      Returns:
      the task arrival rate of the executor, in tasks per second
    • getMeanTaskCompletionRate

      public double getMeanTaskCompletionRate()
      Returns:
      the mean task completion rate of the executor, in tasks per second
    • getTaskCompletionRate

      public double getTaskCompletionRate(double quantile)
      Parameters:
      quantile - the point within the distribution to look up, 0.5 returns the median, 0.9 the 90th percentile
      Returns:
      the task completion rate of the executor, in tasks per second
    • getMeanTaskRejectionRate

      public double getMeanTaskRejectionRate()
      Returns:
      the mean task rejection rate of the executor, in tasks per second
    • getTaskRejectionRate

      public double getTaskRejectionRate(double quantile)
      Parameters:
      quantile - the point within the distribution to look up, 0.5 returns the median, 0.9 the 90th percentile
      Returns:
      the task rejection rate of the executor, in tasks per second
    • getMeanQueueLength

      public double getMeanQueueLength()
      Returns:
      the mean length of the queue
    • getQueueLength

      public double getQueueLength(double quantile)
      Parameters:
      quantile - the point within the distribution to look up, 0.5 returns the median, 0.9 the 90th percentile
      Returns:
      the length of the queue
    • getMeanQueueLatency

      public double getMeanQueueLatency()
      Returns:
      the mean time each task spends on the queue, in nanoseconds
    • getQueueLatency

      public double getQueueLatency(double quantile)
      Parameters:
      quantile - the point within the distribution to look up, 0.5 returns the median, 0.9 the 90th percentile
      Returns:
      the time each task spends on the queue, in nanoseconds
    • getMeanTaskLatency

      public double getMeanTaskLatency()
      Returns:
      the mean time each task takes to complete, including time on the queue, in nanoseconds
    • getTaskLatency

      public double getTaskLatency(double quantile)
      Parameters:
      quantile - the point within the distribution to look up, 0.5 returns the median, 0.9 the 90th percentile
      Returns:
      the time each task takes to complete, including time on the queue, in nanoseconds