Class: Prometheus::Client::Histogram
- Inherits:
-
Object
- Object
- Prometheus::Client::Histogram
- Defined in:
- lib/emrb/ext/prometheus.rb
Overview
Internal: Extension of Prometheus::Client::Histogram that can be used for implementing facilities.
Instance Method Summary collapse
Instance Method Details
#measure ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/emrb/ext/prometheus.rb', line 23 def measure(**, &) raise LocalJumpError, "no block given" unless block_given? now = Time.now yield ensure obs(Time.now - now, **) end |