Skip to content

Instantly share code, notes, and snippets.

@tailhook
Created February 10, 2016 22:00
Show Gist options
  • Select an option

  • Save tailhook/efcbb45a1dfbe04bee25 to your computer and use it in GitHub Desktop.

Select an option

Save tailhook/efcbb45a1dfbe04bee25 to your computer and use it in GitHub Desktop.
import random
from time import sleep
from stator import carbon
def main():
carbon.init_env()
while True:
v1 = random.randrange(10, 100)
v2 = random.randrange(100, 1000)/10.0
carbon.add("py.stator.random.int", v1)
carbon.add("py.stator.random.float", v2)
sleep(1)
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment