def search(self, *args, **kwargs): timer = get_timer('totals.pyelasticsearch') timer.start() with django_statsd.with_('pyelasticsearch.search'): result = origElasticSearch.search(self, *args, **kwargs) timer.stop() return result
def execute_command(self, func_name, *args, **kwargs): timer = get_timer('totals.redis.%s' % func_name.lower()) timer.start() with django_statsd.with_('redis.%s' % func_name.lower()): result = origRedis.execute_command(self, func_name, *args, **kwargs) timer.stop() return result
def execute_command(self, func_name, *args, **kwargs): with django_statsd.with_("redis.%s" % func_name.lower()): return origRedis.execute_command(self, func_name, *args, **kwargs)
def executemany(self, *args, **kwargs): with django_statsd.with_('sql.executemany'): return self.cursor.executemany(*args, **kwargs)
def execute(self, *args, **kwargs): with django_statsd.with_('sql.%s' % self.db.alias): return self.cursor.execute(*args, **kwargs)
def executemany(self, *args, **kwargs): with django_statsd.with_("sql.%s" % self.db.alias): return self.cursor.executemany(*args, **kwargs)
def execute_command(self, func_name, *args, **kwargs): with django_statsd.with_('redis.%s' % func_name.lower()): return origRedis.execute_command(self, func_name, *args, **kwargs)