code: def handler_profiler(filename=None):
      
      if filename == None:
          f = sys.stdout
      else:
          f = open(filename, 'w')
      def _callfunc(handle):
          @wraps(handle)
          def func(self, topic, msg):
              t0 = time.time()
              handle(self, topic, msg)
              t1 = time.time()
              print(f'{self.name}-handle运行时间:{t1 - t0}s', file=f)
  
          return func
      return _callfunc
docs: handler的性能测试装饰器
      :param filename:
      :return: