1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
//! Shared histogram bucket boundaries.
//!
//! Latency families draw their boundaries from a shared constant rather than
//! writing literals, so two families measuring the same class of work stay
//! comparable and one recording rule covers both. Boundaries are written out as
//! literals rather than generated: a generator emits values like
//! `0.00193069772888325`, which makes the `le` label churn between releases and
//! breaks every dashboard pinned to a boundary.
//!
//! [`Histogram::new`](prometheus_client::metrics::histogram::Histogram::new)
//! appends the `+Inf` bucket itself, so these arrays must not carry one.
//!
//! Bands land with the families that need them rather than sitting here unused.
/// 1 ms to 10 s: gRPC handlers and metadata-backend operations.
///
/// The upper bound is deliberately well past any healthy value for this class of
/// work. Anything slower is already an outage, and the `+Inf` bucket is enough to
/// see it.
pub const FAST: = ;
/// Half a second to 1 hour: whole-model download and load.
///
/// The top boundary is deliberately an hour. A cold DeepSeek-V3 warm-up runs for
/// roughly forty minutes, so a band topping out at the transfer scale would put
/// every cold load in `+Inf` and make the one case worth measuring unmeasurable.
///
/// The bottom is 0.5 s for the mirror-image reason, learned the hard way. With
/// the band starting at 5 s, every load faster than that landed in one bucket
/// and `histogram_quantile` interpolated linearly across `[0, 5]` -- so a
/// measured 3.80 s load reported p50 2.50, p95 4.75, p99 4.95. Not one of those
/// is the observation; they are `q * 5` and nothing else. Fast loads are not an
/// edge case here: a small model, a warm cache and a P2P transfer that works are
/// all sub-5 s, and those are exactly the cases a reader compares against a slow
/// one. Three extra boundaries buy resolution across that whole range.
pub const XSLOW: = ;