prometheus/web
Julien 7ebda924b8 fix(web): properly format sub-millisecond durations in target status page
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>
2024-09-20 12:02:17 +02:00
..
api/v1 chore: Fix typos (#14868) 2024-09-10 22:32:03 +02:00
ui fix(web): properly format sub-millisecond durations in target status page 2024-09-20 12:02:17 +02:00
federate.go Move from golang.org/x/exp/slices into slices now that we only support Go >= 1.21 2024-02-28 14:54:53 +01:00
federate_test.go Enable perfsprint linter and fix up code 2024-05-15 17:51:05 +03:00
web.go mantine UI: Distinguish between Not Ready and Stopping 2024-09-17 16:02:16 +02:00
web_test.go mantine UI: Distinguish between Not Ready and Stopping 2024-09-17 16:02:16 +02:00