def start_service(addr, n, authenticator):
s = Subscriber(addr, authenticator=authenticator)<EOL>def do_something(line):<EOL><INDENT>pass<EOL><DEDENT>s.subscribe('<STR_LIT:test>', do_something)<EOL>started = time.time()<EOL>for _ in range(n):<EOL><INDENT>s.process()<EOL><DEDENT>s.socket.close()<EOL>duration = time.time() - started<EOL>print('<STR_LIT>')<EOL>util.print_stats(n, duration)<EOL>return<EOL>
Start a service