added simple stress test
This commit is contained in:
parent
4fcaceb7e4
commit
325186b237
|
@ -1 +1,3 @@
|
||||||
db.json
|
db.json
|
||||||
|
sj.mcquay.me
|
||||||
|
tags
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
import random
|
||||||
|
import requests
|
||||||
|
import time
|
||||||
|
|
||||||
|
start = time.time()
|
||||||
|
count = 0
|
||||||
|
while True:
|
||||||
|
try:
|
||||||
|
r = requests.get("http://localhost:8000/hell/from/python/{}".format(
|
||||||
|
random.randint(0,2000)))
|
||||||
|
count += 1
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
break
|
||||||
|
|
||||||
|
end = time.time()
|
||||||
|
print count, end - start
|
||||||
|
print count / (end - start)
|
||||||
|
|
Loading…
Reference in New Issue