Enum Class TelemetryUnit

java.lang.Object
java.lang.Enum<TelemetryUnit>
com.jprofiler.api.probe.injected.telemetry.TelemetryUnit
All Implemented Interfaces:
Serializable, Comparable<TelemetryUnit>, Constable

public enum TelemetryUnit extends Enum<TelemetryUnit>
Telemetry unit used in the TelemetryFormat annotation.
  • Enum Constant Details

    • PLAIN

      public static final TelemetryUnit PLAIN
      The telemetry value is a unitless number.
    • PER_SECOND

      public static final TelemetryUnit PER_SECOND
      The telemetry value has the unit "per second".
    • PERCENT

      public static final TelemetryUnit PERCENT
      The telemetry value has the unit "percent".
    • MILLISECONDS

      public static final TelemetryUnit MILLISECONDS
      The telemetry value has the unit "milliseconds". Conversion into higher unit prefixes such as seconds is done automatically as required.
    • MICROSECONDS

      public static final TelemetryUnit MICROSECONDS
      The telemetry value has the unit "microseconds". Conversion into higher unit prefixes such as seconds is done automatically as required.
    • BYTES

      public static final TelemetryUnit BYTES
      The telemetry value has the unit "bytes". Conversion into higher unit prefixes such as kB, MB or GB is done automatically as required.

      In JProfiler, probe telemetry data is stored in 32-bit ints. If you expect higher values than 2^31 bytes, you can for example return kB instead and set TelemetryFormat.scale() to -3.

  • Method Details

    • values

      public static TelemetryUnit[] 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 TelemetryUnit 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