class Twirl::Instrumentation::StatsdSubscriber
Attributes
client[RW]
Public Instance Methods
update_counter(metric, value = 1)
click to toggle source
# File lib/twirl/instrumentation/statsd_subscriber.rb, line 21 def update_counter(metric, value = 1) if self.class.client self.class.client.increment metric, value end end
update_timer(metric)
click to toggle source
# File lib/twirl/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