Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save tailhook/1e1c7a707eb7c6aa8b58 to your computer and use it in GitHub Desktop.
while True:
v1 = random.randrange(10, 100)
v2 = random.randrange(100, 1000)/10.0
start = clock()
carbon.add("py.stator.random.int", v1)
carbon.add("py.stator.random.float", v2)
sleep(1)
end = clock()
print(format(end - start, '0.5f'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment