From ac2c74e5f3c5dd2ecb8a15cff7e7893b4e8b152c Mon Sep 17 00:00:00 2001 From: Min RK Date: Thu, 9 Nov 2023 09:23:50 +0100 Subject: [PATCH] increase resolution of event-loop-tick metric to 5ms below 50ms --- jupyterhub/metrics.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/jupyterhub/metrics.py b/jupyterhub/metrics.py index 1389d212..c8e91ea0 100644 --- a/jupyterhub/metrics.py +++ b/jupyterhub/metrics.py @@ -236,6 +236,30 @@ EVENT_LOOP_INTERVAL_SECONDS = Histogram( 'event_loop_interval_seconds', 'Distribution of measured event loop intervals', namespace=metrics_prefix, + # Increase resolution to 5ms below 50ms + # because this is where we are most sensitive. + # No need to have buckets below 25, since we only measure every 20ms. + buckets=[ + # 5ms from 25-50ms + 25e-3, + 30e-3, + 35e-3, + 40e-3, + 45e-3, + 50e-3, + # from here, default prometheus buckets + 75e-3, + 0.1, + 0.25, + 0.5, + 0.75, + 1, + 2.5, + 5, + 7.5, + 10, + float("inf"), + ], )