Class: Metrix::Graphite

Inherits:
TcpReporter show all
Defined in:
lib/metrix/graphite.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#hostObject (readonly)

Returns the value of attribute host.



7
8
9
# File 'lib/metrix/graphite.rb', line 7

def host
  @host
end

#portObject (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_sizeObject



13
14
15
# File 'lib/metrix/graphite.rb', line 13

def window_size
  90
end