gateway metrics: T25b test fix — le buckets are cumulative
This commit is contained in:
@@ -1622,14 +1622,15 @@ mod tests {
|
|||||||
out.contains("smg_g9i_class_ttft_seconds_bucket{class=\"hot\",le=\"+Inf\"} 5"),
|
out.contains("smg_g9i_class_ttft_seconds_bucket{class=\"hot\",le=\"+Inf\"} 5"),
|
||||||
"+Inf bucket counts all 5:\n{out}"
|
"+Inf bucket counts all 5:\n{out}"
|
||||||
);
|
);
|
||||||
// lookup_depth: 7 -> le=10; 120 -> le=200.
|
// lookup_depth: 7 -> le=10; both samples (7, 120) <= 200
|
||||||
|
// (Prometheus buckets are cumulative).
|
||||||
assert!(
|
assert!(
|
||||||
out.contains("smg_g9i_shadow_prefix_lookup_depth_bucket{le=\"10\"} 1"),
|
out.contains("smg_g9i_shadow_prefix_lookup_depth_bucket{le=\"10\"} 1"),
|
||||||
"depth 7 lands in le=10:\n{out}"
|
"depth 7 lands in le=10:\n{out}"
|
||||||
);
|
);
|
||||||
assert!(
|
assert!(
|
||||||
out.contains("smg_g9i_shadow_prefix_lookup_depth_bucket{le=\"200\"} 1"),
|
out.contains("smg_g9i_shadow_prefix_lookup_depth_bucket{le=\"200\"} 2"),
|
||||||
"depth 120 lands in le=200:\n{out}"
|
"both depths land at or below le=200 (cumulative):\n{out}"
|
||||||
);
|
);
|
||||||
assert!(
|
assert!(
|
||||||
out.contains("smg_g9i_shadow_prefix_lookup_depth_count 2"),
|
out.contains("smg_g9i_shadow_prefix_lookup_depth_count 2"),
|
||||||
|
|||||||
Reference in New Issue
Block a user