Class: Toy::Instrumentation::StatsdSubscriber
- Inherits:
-
Subscriber
- Object
- Subscriber
- Toy::Instrumentation::StatsdSubscriber
- Defined in:
- lib/toy/instrumentation/statsd_subscriber.rb
Class Attribute Summary collapse
-
.client ⇒ Object
Returns the value of attribute client.
Instance Method Summary collapse
Methods inherited from Subscriber
Constructor Details
This class inherits a constructor from Toy::Instrumentation::Subscriber
Class Attribute Details
.client ⇒ Object
Returns the value of attribute client.
12 13 14 |
# File 'lib/toy/instrumentation/statsd_subscriber.rb', line 12 def client @client end |
Instance Method Details
#update_timer(metric) ⇒ Object
15 16 17 18 19 |
# File 'lib/toy/instrumentation/statsd_subscriber.rb', line 15 def update_timer(metric) if self.class.client self.class.client.timing metric, (@duration * 1_000).round end end |