Enum Class SLOType

java.lang.Object
java.lang.Enum<SLOType>
com.tnsai.quality.slo.SLOType
All Implemented Interfaces:
Serializable, Comparable<SLOType>, Constable

public enum SLOType extends Enum<SLOType>
What kind of metric an SLO measures (issue #92).
Since:
0.5.0 (issue #92)
  • Enum Constant Details

    • AVAILABILITY

      public static final SLOType AVAILABILITY
      Successful-attempt fraction over total attempts.
    • LATENCY

      public static final SLOType LATENCY
      Fraction of attempts whose latency falls under Target.latencyThresholdMs. Reported as percentage — e.g. p95 invalid input: '<' 3s expressed as "95% of attempts under 3000ms".
    • ERROR_RATE

      public static final SLOType ERROR_RATE
      Fraction of attempts that produced an error (any error class). Subset of AVAILABILITY typically, but exposed separately because consumers often want a tighter threshold for error-rate than for raw availability.
    • CUSTOM

      public static final SLOType CUSTOM
      User-defined metric. The evaluator reads a custom counter or gauge identified by name. Used as the escape hatch for cost, throughput, queue depth, etc.
  • Method Details

    • values

      public static SLOType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SLOType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null