code: def profile(func):
      
      @inlineCallbacks
      def callme(*args, **kwargs):
          start = time.time()
          ret = yield func(*args, **kwargs)
          time_to_execute = time.time() - start
          log.msg('%s executed in %.3f seconds' % (func.__name__, time_to_execute))
          returnValue(ret)
      return callme
docs: Simple profile decorator, monitors method execution time