module Octo::Stats
Instrumentation and Statistical module
Public Instance Methods
instrument(name) { || ... }
click to toggle source
Instrument a block identified by its name @param [Symbol] name The name by which this would be identified
# File lib/octocore-cassandra/stats.rb, line 10 def instrument(name) if stats stats.time(name.to_s, &Proc.new) else yield end end
stats()
click to toggle source
Get stats instance
# File lib/octocore-cassandra/stats.rb, line 19 def stats if statd_config @statsd = Statsd.new(*statd_config.values) unless @statsd @statsd end end
Private Instance Methods
statd_config()
click to toggle source
Get stats config from Octo
# File lib/octocore-cassandra/stats.rb, line 29 def statd_config Octo.get_config :statsd end