MCPcopy Index your code
hub / github.com/statsd/statsd / update_stats

Method update_stats

examples/python_example.py:79–87  ·  view source on GitHub ↗

Pipeline function that formats data, samples it and passes to send() >>> client = StatsdClient() >>> client.update_stats('example.update_stats', 73, "c", 0.9)

(self, stats, value, _type, sample_rate=1)

Source from the content-addressed store, hash-verified

77 self.update_stats(stats, value, self.SC_COUNT, sample_rate)
78
79 def update_stats(self, stats, value, _type, sample_rate=1):
80 """
81 Pipeline function that formats data, samples it and passes to send()
82
83 >>> client = StatsdClient()
84 >>> client.update_stats('example.update_stats', 73, "c", 0.9)
85 """
86 stats = self.format(stats, value, _type)
87 self.send(self.sample(stats, sample_rate), self.addr)
88
89 @staticmethod
90 def format(keys, value, _type):

Callers 4

timingMethod · 0.95
gaugeMethod · 0.95
setMethod · 0.95
countMethod · 0.95

Calls 3

formatMethod · 0.95
sendMethod · 0.95
sampleMethod · 0.95

Tested by

no test coverage detected