def __getattribute__(self, name):
    attr = object.__getattribute__(self, name)
    if hasattr(attr, '__call__'):

        def newfunc(*args, **kwargs):
            now = datetime.datetime.now()
            result = attr(*args, **kwargs)
            total = (datetime.datetime.now() - now)
            logger.info(LOGChoice.performance_data.value, extra=log_json(self.halo_context, {LOGChoice.type.value: SYSTEMChoice.dbaccess.value, LOGChoice.milliseconds.value: int((total.total_seconds() * 1000)), LOGChoice.function.value: str(attr.__name__)}))
            return result
        return newfunc
    else:
        return attr
def __getattribute__(self, name):
    attr = object.__getattribute__(self, name)
    if hasattr(attr, '__call__'):

        def newfunc(*args, **kwargs):
            now = datetime.datetime.now()
            result = attr(*args, **kwargs)
            total = (datetime.datetime.now() - now)
            logger.info(LOGChoice.performance_data.value, extra=log_json(self.halo_context, {LOGChoice.type.value: SYSTEMChoice.dbaccess.value, LOGChoice.milliseconds.value: int((total.total_seconds() * 1000)), LOGChoice.function.value: str(attr.__name__)}))
            return result
        return newfunc
    else:
        return attr