1
0
mirror of https://github.com/kakwa/uts-server synced 2024-12-04 23:15:54 +01:00

displaying the timer every 1000 requests instead of every 10000

This commit is contained in:
kakwa 2016-09-09 00:03:42 +02:00
parent f5f6099abe
commit a4225b4810

View File

@ -18,7 +18,7 @@ while True:
response = h1.getresponse()
h1.close()
counter += 1
if counter % 10000 == 0:
if counter % 1000 == 0:
new_time = time.time()
print( str(int(10000 / (new_time - old_time))) + " req/s (10000 requests in " + str(new_time - old_time) + " seconds)")
print( str(int(1000 / (new_time - old_time))) + " req/s (1000 requests in " + str(new_time - old_time) + " seconds)")
old_time = time.time()