def main(): settings_from_file(os.path.expanduser(os.path.join('~', '.sentry', 'sentry.conf.py'))) from raven.contrib.django.models import get_client client = get_client() functions = funcs() while True: random.choice(functions)(client) time.sleep(1)
def main(): settings_from_file(os.path.expanduser(os.path.join("~", ".sentry", "sentry.conf.py"))) from raven.contrib.django import DjangoClient client = DjangoClient() functions = funcs() while True: random.choice(functions)(client) time.sleep(1)
def main(): settings_from_file( os.path.expanduser(os.path.join('~', '.sentry', 'sentry.conf.py'))) from raven.contrib.django import DjangoClient client = DjangoClient() functions = funcs() while True: random.choice(functions)(client) time.sleep(1)
def main(): settings_from_file(os.path.expanduser(os.path.join('~', '.sentry', 'sentry.conf.py'))) from raven.contrib.django.models import get_client client = get_client() functions = funcs() s = time.time() r = 0 try: while True: random.choice(functions)(client) r += 1 eventlet.sleep(0.1) except KeyboardInterrupt: pass finally: total_time = time.time() - s print '%d requests serviced in %.3fs' % (r, total_time) avg = total_time / r print 'avg of %.3fs/req, %d req/s' % (avg, 1 / avg)