Last active
February 21, 2016 12:21
-
-
Save roblayton/31201173f4b96d9f72d5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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