Class: Metrix::Graphite
- Inherits:
-
TcpReporter
- Object
- TcpReporter
- Metrix::Graphite
- Defined in:
- lib/metrix/graphite.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
Instance Method Summary collapse
-
#initialize(host, port = 2003) ⇒ Graphite
constructor
A new instance of Graphite.
- #serialize_metric(m) ⇒ Object
- #window_size ⇒ Object
Methods inherited from TcpReporter
#<<, #buffers, #flush, #logger
Constructor Details
#initialize(host, port = 2003) ⇒ Graphite
Returns a new instance of Graphite.
9 10 11 |
# File 'lib/metrix/graphite.rb', line 9 def initialize(host, port = 2003) super(host, port, 100) end |
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
7 8 9 |
# File 'lib/metrix/graphite.rb', line 7 def host @host end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
7 8 9 |
# File 'lib/metrix/graphite.rb', line 7 def port @port end |
Instance Method Details
#serialize_metric(m) ⇒ Object
17 18 19 |
# File 'lib/metrix/graphite.rb', line 17 def serialize_metric(m) m.to_graphite end |
#window_size ⇒ Object
13 14 15 |
# File 'lib/metrix/graphite.rb', line 13 def window_size 90 end |