<s> import random <EOL> try : <EOL> from urllib import urlencode <EOL> except ImportError : <EOL> from urllib . parse import urlencode <EOL> from flask import request <EOL> from . app import app <EOL> @ app . route ( '<STR_LIT>' ) <EOL> def bench_test ( ) : <EOL> total = int ( request . args . get ( '<STR_LIT>' , <NUM_LIT> ) ) <EOL> show = int ( request . args . get ( '<STR_LIT>' , <NUM_LIT:20> ) ) <EOL> nlist = [ random . randint ( <NUM_LIT:1> , total ) for _ in range ( show ) ] <EOL> result = [ ] <EOL> result . append ( "<STR_LIT>" ) <EOL> args = dict ( request . args ) <EOL> for nl in nlist : <EOL> args [ '<STR_LIT:n>' ] = nl <EOL> argstr = urlencode ( sorted ( args . items ( ) ) , doseq = True ) <EOL> result . append ( "<STR_LIT>" . format ( argstr , nl ) ) <EOL> result . append ( "<STR_LIT>" ) <EOL> return "<STR_LIT>" . join ( result ) </s>
