Enum TelemetryUnit
- java.lang.Object
-
- java.lang.Enum<TelemetryUnit>
-
- com.jprofiler.api.probe.embedded.telemetry.TelemetryUnit
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<TelemetryUnit>
public enum TelemetryUnit extends java.lang.Enum<TelemetryUnit>
Telemetry unit used in theTelemetryFormatannotation.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BYTESThe telemetry value has the unit "bytes".MICROSECONDSThe telemetry value has the unit "microseconds".MILLISECONDSThe telemetry value has the unit "milliseconds".PER_SECONDThe telemetry value has the unit "per second".PERCENTThe telemetry value has the unit "percent".PLAINThe telemetry value is a unitless number.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TelemetryUnitvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static TelemetryUnit[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 Detail
-
values
public static TelemetryUnit[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TelemetryUnit c : TelemetryUnit.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TelemetryUnit valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-