Class: StatsdServer::Stats
- Inherits:
-
Object
- Object
- StatsdServer::Stats
- Defined in:
- lib/statsdserver/stats.rb
Instance Attribute Summary collapse
-
#counters ⇒ Object
Returns the value of attribute counters.
-
#gauges ⇒ Object
Returns the value of attribute gauges.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#timers ⇒ Object
Returns the value of attribute timers.
Instance Method Summary collapse
-
#initialize ⇒ Stats
constructor
A new instance of Stats.
Constructor Details
#initialize ⇒ Stats
Returns a new instance of Stats.
11 12 13 14 15 16 |
# File 'lib/statsdserver/stats.rb', line 11 def initialize @timers = Hash.new { |h, k| h[k] = Array.new } @counters = Hash.new { |h, k| h[k] = 0 } @gauges = Hash.new { |h, k| h[k] = 0 } @logger = Logger.new(STDERR) end |
Instance Attribute Details
#counters ⇒ Object
Returns the value of attribute counters.
5 6 7 |
# File 'lib/statsdserver/stats.rb', line 5 def counters @counters end |
#gauges ⇒ Object
Returns the value of attribute gauges.
5 6 7 |
# File 'lib/statsdserver/stats.rb', line 5 def gauges @gauges end |
#logger ⇒ Object
Returns the value of attribute logger.
5 6 7 |
# File 'lib/statsdserver/stats.rb', line 5 def logger @logger end |
#timers ⇒ Object
Returns the value of attribute timers.
5 6 7 |
# File 'lib/statsdserver/stats.rb', line 5 def timers @timers end |