Created
April 17, 2015 15:29
-
-
Save danilochilene/5049e19622c86c765ce8 to your computer and use it in GitHub Desktop.
Python script to load statsd to InfluxDB
This file contains 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
import random | |
import statsd | |
n = 1 | |
limit = 100000 | |
while n <= limit: | |
c = statsd.StatsClient('localhost', 8125) | |
c.incr('foo') # Increment the 'foo' counter. | |
c.gauge('foo', random.randint(1, 100000000)) | |
n = n +1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
time python bulk_statsd.py
python bulk_statsd.py 4,64s user 4,02s system 94% cpu 9,160 total