<s> import os , sys <EOL> sys . path . append ( "<STR_LIT:..>" ) <EOL> from riemann import RiemannClient <EOL> import time <EOL> import gevent <EOL> from gevent import pool <EOL> from gevent import monkey <EOL> gevent . monkey . patch_all ( ) <EOL> def _s ( pars ) : <EOL> rc = RiemannClient ( ) <EOL> r = rc . send ( pars ) <EOL> def main ( ) : <EOL> tb = time . time ( ) <EOL> p = pool . Group ( ) <EOL> for n in xrange ( <NUM_LIT:100> ) : <EOL> pars = { '<STR_LIT:host>' : '<STR_LIT:127.0.0.1>' , '<STR_LIT>' : '<STR_LIT>' % n , '<STR_LIT:state>' : '<STR_LIT>' , '<STR_LIT>' : <NUM_LIT> } <EOL> c = p . spawn ( _s , pars ) <EOL> p . join ( ) <EOL> print time . time ( ) - tb <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
