Permalink
Browse files

examples: python: unify parameter names

  • Loading branch information...
1 parent 1857aee commit d49b7d9a6c8d5e744462402ba8e0ebee9f63bc57 @SaveTheRbtz SaveTheRbtz committed Dec 23, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 examples/python_example.py
@@ -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):
@@ -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

0 comments on commit d49b7d9

Please sign in to comment.