

def __getattr__(self, name):
    func = xmlrpclib.ServerProxy.__getattr__(self, self)

    def wrapper(*args, **kwargs):
        start_time = time.time()
        try:
            result = func(*args, **kwargs)
        except xmlrpclib.Fault as e:
            total_time = int(((time.time() - start_time) * 1000))
            events.request_failure.fire(request_type='xmlrpc', name=name, response_time=total_time, exception=e)
        else:
            total_time = int(((time.time() - start_time) * 1000))
            events.request_success.fire(request_type='xmlrpc', name=name, response_time=total_time, response_length=0)
    return wrapper

dataset/ETHPy150Open locustio/locust/examples/custom_xmlrpc_client/xmlrpc_locustfile.py XmlRpcClient.__getattr__/VarMisuse@22/27 `name`->`self`