public class PrometheusUnit extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
getBaseUnitAsPrometheusString(String unit)
Determines the basic unit to be used by Prometheus exporter based on the input unit from parameter.
|
static Double |
scaleToBase(String inputUnit,
Double value)
Scales the value (time or memory size) interpreted using inputUnit to the base unit for Prometheus exporter
That means:
- values for memory size units are scaled to bytes
- values for time units are scaled to seconds
- values for other units are returned unchanged
|
public static String getBaseUnitAsPrometheusString(String unit)
public static Double scaleToBase(String inputUnit, Double value)
Copyright © 2019. All rights reserved.