swh.search.metrics module#


Time that function!

swh.search.metrics.send_metric(metric: str, count: int, method_name: str) bool[source]#

Send statsd metric with count for method method_name

If count is 0, the metric is discarded. If the metric is not parseable, the metric is discarded with a log message.

  • metric – Metric’s name (e.g content:add, content:add:bytes)

  • count – Associated value for the metric

  • method_name – Method’s name


Bool to explicit if metric has been set or not