Skip to content

Instantly share code, notes, and snippets.

@roblayton
Last active February 21, 2016 12:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roblayton/31201173f4b96d9f72d5 to your computer and use it in GitHub Desktop.
Save roblayton/31201173f4b96d9f72d5 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
import random
import time
import statsd
ctr_name = 'stats.test.1'
while True:
client = statsd.StatsClient('localhost', 8125)
rand = random.randrange(1, 250)
print('count: (%d)' % rand)
while rand > 0:
client.incr(ctr_name, 5)
rand -= 1
time.sleep(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment