diff --git a/rhodecode/lib/_vendor/statsd/base.py b/rhodecode/lib/_vendor/statsd/base.py --- a/rhodecode/lib/_vendor/statsd/base.py +++ b/rhodecode/lib/_vendor/statsd/base.py @@ -44,9 +44,9 @@ class StatsClientBase(object): def pipeline(self): raise NotImplementedError() - def timer(self, stat, rate=1, tags=None): + def timer(self, stat, rate=1, tags=None, auto_send=True): """ - statsd = StatsdClient() + statsd = StatsdClient.statsd with statsd.timer('bucket_name', auto_send=True) as tmr: # This block will be timed. for i in xrange(0, 100000): @@ -54,7 +54,7 @@ class StatsClientBase(object): # you can access time here... elapsed_ms = tmr.ms """ - return Timer(self, stat, rate, tags) + return Timer(self, stat, rate, tags, auto_send=auto_send) def timing(self, stat, delta, rate=1, tags=None, use_decimals=True): """