mirror of
https://github.com/prometheus/prometheus.git
synced 2025-10-10 07:01:01 +02:00
Previously, scrapes durations that are very short (e.g., connection refused) could show as empty (durations under 1 millisecond). This commit ensures that sub-millisecond durations are correctly displayed as "0ms" or "1ms" when necessary. - Adjusted `humanizeDuration` to round sub-millisecond durations to the nearest millisecond. - Updated unit tests to verify the correct handling of sub-millisecond values. Signed-off-by: Julien <roidelapluie@o11y.eu>