Skip to content

FedericoCeratto/nim-statsd-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StatsD client for Nim

badge tags License

A simple, stateless StatsD client.

Documentation: module index

Install:

nimble install statsd_client

Usage example:

import statsd_client

let stats = newStatdClient(prefix="foo")
stats.incr("mycnt")
stats.incr("mycnt", 3)
stats.decr("mycnt", 3)
stats.timing("mytimer_float", 110.0)
stats.timing("mytimer_int", 110)
stats.gauge("mygauge", 1.0)
stats.gauge("mygauge", 2)
stats.gauge("mygauge", 1, delta=true)
stats.gauge("mygauge", -2, delta=true)
stats.set("set_one", "a")
stats.set("set_one", "b")
stats.timed("mytimer"):
  slow_proc()