Commit 027403aa authored by Vincent Michel's avatar Vincent Michel

Update benchmark

parent 6c7be8d1
Pipeline #6773 passed with stages
in 22 minutes and 44 seconds
import time
import gevent
import argparse
from matplotlib import pyplot as plt
......@@ -8,7 +7,7 @@ def run(n=300, t=0.01, plot=False, raw=False):
deltas = []
for _ in range(n):
start = time.time()
gevent.sleep(t)
time.sleep(t)
deltas.append(time.time() - start)
print("min = {:.5f}".format(min(deltas)))
print("max = {:.5f}".format(max(deltas)))
......@@ -16,7 +15,7 @@ def run(n=300, t=0.01, plot=False, raw=False):
if raw:
print("deltas = {}".format(deltas))
if plot:
plt.hist(deltas)
plt.hist(deltas, log=True)
plt.show()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment