예제 #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
예제 #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
예제 #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)
예제 #4
0
 def executemany(self, *args, **kwargs):
     with django_statsd.with_('sql.executemany'):
         return self.cursor.executemany(*args, **kwargs)
예제 #5
0
 def execute(self, *args, **kwargs):
     with django_statsd.with_('sql.%s' % self.db.alias):
         return self.cursor.execute(*args, **kwargs)
예제 #6
0
 def execute(self, *args, **kwargs):
     with django_statsd.with_('sql.%s' % self.db.alias):
         return self.cursor.execute(*args, **kwargs)
예제 #7
0
 def executemany(self, *args, **kwargs):
     with django_statsd.with_("sql.%s" % self.db.alias):
         return self.cursor.executemany(*args, **kwargs)
예제 #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)