def fetchall(self):
        query_time = 0
        try:
            t_begin = time.time()
            res = super(TracingCursor, self).fetchall()
            query_time = time.time() - t_begin
            return res
        finally:
            log_entry = getattr(self, "_current_entry", None)
            if log_entry and log_entry.get("statement", "") == self.query and "statement_time" in log_entry:
                log_entry["statement_time"] += query_time
dataset/ETHPy150Open ooici/pyon/pyon/datastore/postgresql/pg_util.py/TracingCursor.fetchall/original