Class: Strumbar::Client
- Inherits:
-
Statsd
- Object
- Statsd
- Strumbar::Client
- Defined in:
- lib/strumbar/client.rb
Instance Method Summary collapse
- #count(stat, value, sample_rate = Strumbar.default_rate) ⇒ Object
- #decrement(stat, sample_rate = Strumbar.default_rate) ⇒ Object
- #gauge(stat, value, sample_rate = Strumbar.default_rate) ⇒ Object
- #increment(stat, sample_rate = Strumbar.default_rate) ⇒ Object
-
#initialize(host, port) ⇒ Client
constructor
A new instance of Client.
- #set(stat, value, sample_rate = Strumbar.default_rate) ⇒ Object
- #timing(stat, time, sample_rate = Strumbar.default_rate) ⇒ Object
Constructor Details
#initialize(host, port) ⇒ Client
Returns a new instance of Client.
5 6 7 8 |
# File 'lib/strumbar/client.rb', line 5 def initialize host, port @host = host @port = port end |
Instance Method Details
#count(stat, value, sample_rate = Strumbar.default_rate) ⇒ Object
22 23 24 |
# File 'lib/strumbar/client.rb', line 22 def count stat, value, sample_rate = Strumbar.default_rate super "#{Strumbar.application}.#{stat}", value, sample_rate end |
#decrement(stat, sample_rate = Strumbar.default_rate) ⇒ Object
18 19 20 |
# File 'lib/strumbar/client.rb', line 18 def decrement stat, sample_rate = Strumbar.default_rate super stat, sample_rate end |
#gauge(stat, value, sample_rate = Strumbar.default_rate) ⇒ Object
26 27 28 |
# File 'lib/strumbar/client.rb', line 26 def gauge stat, value, sample_rate = Strumbar.default_rate super "#{Strumbar.application}.#{stat}", value, sample_rate end |
#increment(stat, sample_rate = Strumbar.default_rate) ⇒ Object
14 15 16 |
# File 'lib/strumbar/client.rb', line 14 def increment stat, sample_rate = Strumbar.default_rate super stat, sample_rate end |