Skip to content

Instantly share code, notes, and snippets.

@cbronazc
Created August 14, 2014 23:07
Show Gist options
  • Save cbronazc/9941d368bb23ee5808fa to your computer and use it in GitHub Desktop.
Save cbronazc/9941d368bb23ee5808fa to your computer and use it in GitHub Desktop.
request_timer.sh
#!/usr/bin/python
activate_this_file = "/Users/my_username/.virtualenvs/virtual_env_name/bin/activate_this.py"
execfile(activate_this_file, dict(__file__=activate_this_file))
import requests
from time import sleep
while 1:
print requests.get("http://my_url.com").elapsed.total_seconds()
sleep(0.5)%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment