зеркало из https://github.com/microsoft/statsd.git
mis-read the timing implementation, fixed to to add "|ms" to an integer time, not take a string "integer|ms"
This commit is contained in:
Родитель
e7d6b82d2c
Коммит
dbc049f95f
|
@ -12,13 +12,15 @@
|
|||
class Statsd(object):
|
||||
|
||||
@staticmethod
|
||||
def timing(stats, time, sample_rate=1):
|
||||
def timing(stat, time, sample_rate=1):
|
||||
"""
|
||||
Log timing information
|
||||
>>> from python_example import Statsd
|
||||
>>> Statsd.timing('some.time','500|ms')
|
||||
"""
|
||||
Statsd.update_stats(stats, time, sample_rate)
|
||||
stats = {}
|
||||
stats[stat] = "%d|ms" % time
|
||||
Statsd.send(stats, sample_rate)
|
||||
|
||||
@staticmethod
|
||||
def increment(stats, sample_rate=1):
|
||||
|
|
Загрузка…
Ссылка в новой задаче