##// END OF EJS Templates
add all completed task IDs to Scheduler.all_done
add all completed task IDs to Scheduler.all_done

File last commit:

r3564:b78cec8e
r3565:168e61b2
Show More
loadbalance.py
20 lines | 342 B | text/x-python | PythonLexer
import time
from IPython.zmq.parallel.client import *
def wait(t):
import time
time.sleep(t)
return t
client = Client('tcp://127.0.0.1:10101')
view = client[None]
tic = time.time()
for i in range(128):
view.apply(wait, 1e-2*i)
# limit to 1k msgs/s
time.sleep(1e-2)
client.barrier()
toc = time.time()
print toc-tic