Enum Class Unit

All Implemented Interfaces:
Serializable, Comparable<Unit>, Constable

public enum Unit extends Enum<Unit>
Measurement unit of user-defined metrics (see Metric). Meant to provide further information on the type of value measured by user metrics.

The unit values will end up populating the metric tag MetricTags.UNIT. It can be used by UI tools to format the value, and it's not used by Jet itself.

Jet 4.0
  • Enum Constant Details

    • BYTES

      public static final Unit BYTES
      Size, counter, represented in bytes
    • MS

      public static final Unit MS
      Timestamp or duration represented in ms

      public static final Unit PERCENT
      An integer in range 0..100
    • COUNT

      public static final Unit COUNT
      Number of items: size, counter...

      public static final Unit BOOLEAN
      0 or 1
    • ENUM

      public static final Unit ENUM
      0..n, ordinal of an enum
  • Method Details

    • values

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

      public static Unit 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.)
      name - the name of the enum constant to be returned.
      the enum constant with the specified name
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null