Method: Datadog::Sampling::TokenBucket#effective_rate
- Defined in:
- lib/ddtrace/sampling/rate_limiter.rb
#effective_rate ⇒ Float
Ratio of ‘conformance’ per ‘total messages’ checked on this bucket.
Returns 1.0 when no messages have been checked yet.
76 77 78 79 80 81 |
# File 'lib/ddtrace/sampling/rate_limiter.rb', line 76 def effective_rate return 0.0 if @rate.zero? return 1.0 if @rate < 0 || .zero? .to_f / end |