We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5514b2b commit 100f46cCopy full SHA for 100f46c
lib/prometheus/client/histogram.rb
@@ -67,7 +67,7 @@ def type
67
# https://prometheus.io/docs/practices/histograms/#count-and-sum-of-observations
68
# for details.
69
def observe(value, labels: {})
70
- bucket = buckets.find {|upper_limit| upper_limit >= value }
+ bucket = buckets.bsearch { |upper_limit| upper_limit >= value }
71
bucket = "+Inf" if bucket.nil?
72
73
base_label_set = label_set_for(labels)
0 commit comments