Skip to content

Commit

Permalink
examples: python: unify parameter names
Browse files Browse the repository at this point in the history
  • Loading branch information
SaveTheRbtz committed Dec 23, 2012
1 parent 1857aee commit d49b7d9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/python_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ def __init__(self, host='localhost', port=8125):
"""
self.addr = (host, port)

def timing(self, stats, time):
def timing(self, stats, value):
"""
Log timing information
>>> client = StatsdClient()
>>> client.timing('example.timing', 500)
>>> client.timing(('example.timing23', 'example.timing29'), 500)
"""
stats = self.format(stats, time, self.SC_TIMING)
stats = self.format(stats, value, self.SC_TIMING)
self.send(stats, self.addr)

def gauge(self, stats, value):
Expand Down Expand Up @@ -70,14 +70,14 @@ def decrement(self, stats, sample_rate=1):
"""
self.count(stats, -1, sample_rate)

def count(self, stats, delta, sample_rate=1):
def count(self, stats, value, sample_rate=1):
"""
Updates one or more stats counters by arbitrary amounts
>>> client = StatsdClient()
>>> client.count('example.counter', 17)
"""
stats = self.format(stats, delta, self.SC_COUNT)
stats = self.format(stats, value, self.SC_COUNT)
self.send(self.sample(stats, sample_rate), self.addr)

@staticmethod
Expand Down

0 comments on commit d49b7d9

Please sign in to comment.