<s> from appenlight_client . utils import import_module , deco_func_or_method <EOL> from appenlight_client . timing import time_trace <EOL> ignore_set = frozenset ( [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def add_timing ( min_duration = <NUM_LIT:3> ) : <EOL> module = import_module ( '<STR_LIT>' ) <EOL> if not module : <EOL> return <EOL> def gather_args_open ( opener , url , * args , ** kwargs ) : <EOL> if not isinstance ( url , basestring ) : <EOL> g_url = url . get_full_url ( ) <EOL> else : <EOL> g_url = url <EOL> return { '<STR_LIT:type>' : '<STR_LIT>' , '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : g_url , <EOL> '<STR_LIT:count>' : True , <EOL> '<STR_LIT>' : ignore_set } <EOL> deco_func_or_method ( module , '<STR_LIT>' , time_trace , <EOL> gatherer = gather_args_open , min_duration = min_duration ) </s>
