#NEWLINE# def run_netperf( message ) : #NEWLINE# #INDENT# threads = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# nb = 0 #NEWLINE# sys . stderr . write ( ( 'Benchmarking %s @%s for %d seconds\n' % ( message . network_test , message . block_size , message . running_time ) ) ) #NEWLINE# for server in message . peer_servers : #NEWLINE# #INDENT# if ( message . my_peer_name == server [ 1 ] ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# threads [ nb ] = threading . Thread ( target = start_bench_client , args = [ server [ 1 ] , get_my_ip_port ( threads ) , message ] ) #NEWLINE# threads [ nb ] . start ( ) #NEWLINE# nb += 1 #NEWLINE# #UNINDENT# sys . stderr . write ( ( 'Waiting %d bench clients to finish\n' % nb ) ) #NEWLINE# for i in range ( nb ) : #NEWLINE# #INDENT# threads [ i ] . join ( )