From b6eb3d89ec19029dfb8566b9d9d09fa786fef946 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sat, 3 Dec 2011 21:40:31 -0700 Subject: [PATCH] Save another per-stat string allocation --- lib/statsd.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/statsd.rb b/lib/statsd.rb index 1fc05ee..77af655 100644 --- a/lib/statsd.rb +++ b/lib/statsd.rb @@ -65,7 +65,7 @@ def decrement(stat, sample_rate=1) # @param [Integer] count count # @param [Numeric] sample_rate sample rate, 1 for always def count(stat, count, sample_rate=1) - send_stats stat, count, 'c', sample_rate + send_stats stat, count, :c, sample_rate end # Sends an arbitary gauge value for the given stat to the statsd server. @@ -80,7 +80,7 @@ def count(stat, count, sample_rate=1) # @example Report the current user count: # $statsd.gauge('user.count', User.count) def gauge(stat, value, sample_rate=1) - send_stats stat, value, 'g', sample_rate + send_stats stat, value, :g, sample_rate end # Sends a timing (in ms) for the given stat to the statsd server. The @@ -92,7 +92,7 @@ def gauge(stat, value, sample_rate=1) # @param [Integer] ms timing in milliseconds # @param [Numeric] sample_rate sample rate, 1 for always def timing(stat, ms, sample_rate=1) - send_stats stat, ms, 'ms', sample_rate + send_stats stat, ms, :ms, sample_rate end # Reports execution time of the provided block using {#timing}.