def execute(self, sql, params=()):
        start = time()
        try:
            return self.cursor.execute(sql, params)
        finally:
            stop = time()
            # If params was a list, convert it to a tuple, because string
            # formatting with '%' only works with tuples or dicts.
            if not isinstance(params, (tuple, dict)):
                params = tuple(params)
            self.db.queries.append({
                'sql': sql % params,
                'time': "%.3f" % (stop - start),
            })
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-0.96/django/db/backends/util.py/CursorDebugWrapper.execute/original