Source code for django_statsd.database

from __future__ import with_statement
import django_statsd


[docs]class TimingCursorWrapper(object):
[docs] def execute(self, *args, **kwargs): with django_statsd.with_('sql.%s' % self.db.alias): return self.cursor.execute(*args, **kwargs)
[docs] def executemany(self, *args, **kwargs): with django_statsd.with_('sql.%s' % self.db.alias): return self.cursor.executemany(*args, **kwargs)