Commit 17aef51e authored by David Wilson's avatar David Wilson

tests: Import .local() latency test

parent a8a31728
"""
Measure latency of .local() setup.
"""
import os
import socket
import mitogen
import time
@mitogen.main() #(log_level='DEBUG')
def main(router):
for x in xrange(1000):
t = time.time()
f = router.local()# debug=True)
tt = time.time()
print x, 1000 * (tt - t)
print f
print 'EEK', f.call(socket.gethostname)
print 'MY PID', os.getpid()
print 'EEKERY', f.call(os.getpid)
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