Skip to content

Commit

Permalink
Uniform docs for method args
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy committed Dec 4, 2011
1 parent 7a5ec4c commit c912e5c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/statsd.rb
Expand Up @@ -33,23 +33,23 @@ def initialize(host, port=8125)

# Sends an increment (count = 1) for the given stat to the statsd server.
#
# @param stat (see #count)
# @param sample_rate (see #count)
# @param [String] stat stat name
# @param [Numeric] sample_rate sample rate, 1 for always
# @see #count
def increment(stat, sample_rate=1); count stat, 1, sample_rate end

# Sends a decrement (count = -1) for the given stat to the statsd server.
#
# @param stat (see #count)
# @param sample_rate (see #count)
# @param [String] stat stat name
# @param [Numeric] sample_rate sample rate, 1 for always
# @see #count
def decrement(stat, sample_rate=1); count stat, -1, sample_rate end

# Sends an arbitrary count for the given stat to the statsd server.
#
# @param [String] stat stat name
# @param [Integer] count count
# @param [Integer] sample_rate sample rate, 1 for always
# @param [Numeric] sample_rate sample rate, 1 for always
def count(stat, count, sample_rate=1); send stat, count, 'c', sample_rate end

# Sends an arbitary gauge value for the given stat to the statsd server.
Expand All @@ -72,15 +72,15 @@ def gauge(stat, value, sample_rate=1)
# statsd server then uses the sample_rate to correctly track the average
# timing for the stat.
#
# @param stat stat name
# @param [String] stat stat name
# @param [Integer] ms timing in milliseconds
# @param [Integer] sample_rate sample rate, 1 for always
# @param [Numeric] sample_rate sample rate, 1 for always
def timing(stat, ms, sample_rate=1); send stat, ms, 'ms', sample_rate end

# Reports execution time of the provided block using {#timing}.
#
# @param stat (see #timing)
# @param sample_rate (see #timing)
# @param [String] stat stat name
# @param [Numeric] sample_rate sample rate, 1 for always
# @yield The operation to be timed
# @see #timing
# @example Report the time (in ms) taken to activate an account
Expand Down

0 comments on commit c912e5c

Please sign in to comment.