Class: Vitals::Reporters::InmemReporter
- Inherits:
-
BaseReporter
- Object
- BaseReporter
- Vitals::Reporters::InmemReporter
- Defined in:
- lib/vitals/reporters/inmem_reporter.rb
Instance Attribute Summary collapse
-
#format ⇒ Object
Returns the value of attribute format.
-
#reports ⇒ Object
Returns the value of attribute reports.
Instance Method Summary collapse
- #flush ⇒ Object
- #gauge(m, v) ⇒ Object
- #inc(m) ⇒ Object
-
#initialize ⇒ InmemReporter
constructor
A new instance of InmemReporter.
- #timing(m, v) ⇒ Object
Methods inherited from BaseReporter
Constructor Details
#initialize ⇒ InmemReporter
Returns a new instance of InmemReporter.
6 7 8 |
# File 'lib/vitals/reporters/inmem_reporter.rb', line 6 def initialize flush end |
Instance Attribute Details
#format ⇒ Object
Returns the value of attribute format.
4 5 6 |
# File 'lib/vitals/reporters/inmem_reporter.rb', line 4 def format @format end |
#reports ⇒ Object
Returns the value of attribute reports.
3 4 5 |
# File 'lib/vitals/reporters/inmem_reporter.rb', line 3 def reports @reports end |
Instance Method Details
#flush ⇒ Object
10 11 12 |
# File 'lib/vitals/reporters/inmem_reporter.rb', line 10 def flush @reports = [] end |
#gauge(m, v) ⇒ Object
18 19 20 |
# File 'lib/vitals/reporters/inmem_reporter.rb', line 18 def gauge(m, v) @reports << { :gauge => n( m ), :val => v } end |
#inc(m) ⇒ Object
14 15 16 |
# File 'lib/vitals/reporters/inmem_reporter.rb', line 14 def inc(m) @reports << { :inc => n( m ) } end |
#timing(m, v) ⇒ Object
22 23 24 |
# File 'lib/vitals/reporters/inmem_reporter.rb', line 22 def timing(m, v) @reports << { :timing => n( m ), :val => v } end |