Class WaitqueueEvaluator

  • All Implemented Interfaces:
    IServiceEvaluator

    public class WaitqueueEvaluator
    extends BasicEvaluator<java.lang.Integer>
    Execution time evaluator. Re-scales execution times from [0,unlimited] to [1,0].
    • Field Detail

      • max

        protected int max
        The wait queue cutoff len.
    • Constructor Detail

      • WaitqueueEvaluator

        public WaitqueueEvaluator​(IExternalAccess component,
                                  MethodInfo mi)
                           throws java.lang.Exception
        Create a new evaluator.
        Throws:
        java.lang.Exception
      • WaitqueueEvaluator

        public WaitqueueEvaluator​(IExternalAccess component,
                                  MethodInfo mi,
                                  int max)
                           throws java.lang.Exception
        Create a new evaluator.
        Throws:
        java.lang.Exception
    • Method Detail

      • calculateEvaluation

        public double calculateEvaluation​(java.lang.Integer value)
        Calculate the value with 1 best and 0 worst. Re-scales waiting times from [0,unlimited] to [1,0]. Uses linear scale with 0=1, 1=0.9, 10=0, 11=0
        Specified by:
        calculateEvaluation in class BasicEvaluator<java.lang.Integer>
        Returns: