def log_stats(fun):
 def newfun(env, res):
  'Log the execution time of the passed function'
  timer = (lambda t: (t.time(), t.clock()))
  (t0, c0) = timer(time)
  executed_function = fun(env, res)
  (t1, c1) = timer(time)
  log_info = '**** Request: %.2fms/%.2fms (real time/cpu time)'
  log_info = (log_info % (((t1 - t0) * 1000), ((c1 - c0) * 1000)))
  logging.info(log_info)
  return executed_function
 return newfun

def log_stats ( fun ) : def newfun ( env , res ) : timer = ( lambda t : ( t . time ( ) , t . clock ( ) ) ) ( t0 , c0 ) = timer ( time ) executed_function = fun ( env , res ) ( t1 , c1 ) = timer ( time ) log_info = '**** Request: %.2fms/%.2fms (real time/cpu time)' log_info = ( log_info % ( ( ( t1 - t0 ) * 1000 ) , ( ( c1 - c0 ) * 1000 ) ) ) logging . info ( log_info ) return executed_function return newfun
function that will act as a decorator to make logging .