def make_profile_middleware(app, global_conf, log_filename='profile.log.tmp', limit=40):
 limit = int(limit)
 return ProfileMiddleware(app, log_filename=log_filename, limit=limit)

def make_profile_middleware ( app , global_conf , log_filename = 'profile.log.tmp' , limit = 40 ) : limit = int ( limit ) return ProfileMiddleware ( app , log_filename = log_filename , limit = limit )
wrap the application in a component that will profile each request .