<s> from create import create_account <EOL> from request import toto_request <EOL> from uuid import uuid4 <EOL> from time import time <EOL> def checkresponse ( response ) : <EOL> if '<STR_LIT:error>' in response : <EOL> print response [ '<STR_LIT:error>' ] <EOL> exit ( ) <EOL> return response <EOL> def verify_count ( response , n ) : <EOL> response = checkresponse ( response ) <EOL> if n != response [ '<STR_LIT:result>' ] [ '<STR_LIT:count>' ] : <EOL> print '<STR_LIT>' % ( n , response [ '<STR_LIT:result>' ] [ '<STR_LIT:count>' ] ) <EOL> print response <EOL> exit ( ) <EOL> return response <EOL> count = int ( raw_input ( '<STR_LIT>' ) or <NUM_LIT:1000> ) <EOL> user_id = uuid4 ( ) . hex <EOL> password = uuid4 ( ) . hex <EOL> print "<STR_LIT>" % ( user_id , password ) <EOL> print checkresponse ( create_account ( user_id , password ) ) <EOL> session = { } <EOL> execfile ( '<STR_LIT>' , session , session ) <EOL> start = time ( ) <EOL> for i in xrange ( <NUM_LIT:1> , count + <NUM_LIT:1> ) : <EOL> verify_count ( toto_request ( '<STR_LIT>' , session = session ) , i ) <EOL> total = time ( ) - start <EOL> print '<STR_LIT>' % ( count , total ) </s>
