Permalink
Browse files

examples: python: renamed update_stats to counter

  • Loading branch information...
1 parent e0f32bf commit f145ca15e28df779d44cc0d495421f4cdb6bd943 @SaveTheRbtz SaveTheRbtz committed Dec 23, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 examples/python_example.py
@@ -35,7 +35,7 @@ def increment(self, stats, sample_rate=1):
>>> client.increment('example.increment')
>>> client.increment('example.increment', 0.5)
"""
- self.update_stats(stats, 1, sample_rate)
+ self.count(stats, 1, sample_rate)
def decrement(self, stats, sample_rate=1):
"""
@@ -44,14 +44,14 @@ def decrement(self, stats, sample_rate=1):
>>> client = StatsdClient()
>>> client.decrement('example.decrement')
"""
- self.update_stats(stats, -1, sample_rate)
+ self.count(stats, -1, sample_rate)
- def update_stats(self, stats, delta=1, sampleRate=1):
+ def count(self, stats, delta=1, sampleRate=1):
"""
Updates one or more stats counters by arbitrary amounts
>>> client = StatsdClient()
- >>> client.update_stats('example.update_stats', 17)
+ >>> client.count('example.counter', 17)
"""
if not isinstance(stats, list):
stats = [stats]

0 comments on commit f145ca1

Please sign in to comment.