Permalink
Browse files

Save another per-stat string allocation

  • Loading branch information...
1 parent a551ba2 commit b6eb3d89ec19029dfb8566b9d9d09fa786fef946 @jeremy committed Dec 4, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/statsd.rb
View
@@ -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}.

0 comments on commit b6eb3d8

Please sign in to comment.