code: def __getattr__(self, name):
      func = getattr(self.m, name)
  
      def wrapper(*args, **kwargs):
          start_time = time.time()
          try:
              result = func(*args, **kwargs)
              total_time = int((time.time() - start_time) * 1000)
              events.request_success.fire(
                  request_type=self.request_type,
                  name=name,
                  response_time=total_time,
                  response_length=0,
              )
          except Exception as e:
              total_time = int((time.time() - start_time) * 1000)
              events.request_failure.fire(
                  request_type=self.request_type,
                  name=name,
                  response_time=total_time,
                  exception=e,
                  response_length=0,
              )
  
      return wrapper
  
file_path: milvus/tests/benchmark/milvus_benchmark/runners/locust_task.py
imports: import time
  import logging
  from locust import User, events
  from milvus_benchmark.client import MilvusClient
label_desc: Use image node_id 2 for calling the MilvusTask obj's underlying member method code with example usage: obj.__getattr__(name) and returns: wrapper