Exemplo n.º 1
0
 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
Exemplo n.º 2
0
 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
Exemplo n.º 3
0
 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)
Exemplo n.º 4
0
 def executemany(self, *args, **kwargs):
     with django_statsd.with_('sql.executemany'):
         return self.cursor.executemany(*args, **kwargs)
Exemplo n.º 5
0
 def execute(self, *args, **kwargs):
     with django_statsd.with_('sql.%s' % self.db.alias):
         return self.cursor.execute(*args, **kwargs)
Exemplo n.º 6
0
 def execute(self, *args, **kwargs):
     with django_statsd.with_('sql.%s' % self.db.alias):
         return self.cursor.execute(*args, **kwargs)
Exemplo n.º 7
0
 def executemany(self, *args, **kwargs):
     with django_statsd.with_("sql.%s" % self.db.alias):
         return self.cursor.executemany(*args, **kwargs)
Exemplo n.º 8
0
 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)