Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/federicoceratto/nim-statsd-client
A simple StatsD client for Nim
https://github.com/federicoceratto/nim-statsd-client
metrics nim nim-lang nim-language nimlang statsd
Last synced: 26 days ago
JSON representation
A simple StatsD client for Nim
- Host: GitHub
- URL: https://github.com/federicoceratto/nim-statsd-client
- Owner: FedericoCeratto
- License: lgpl-3.0
- Created: 2017-01-04T22:50:50.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-04-26T22:28:00.000Z (almost 6 years ago)
- Last Synced: 2024-12-28T04:15:40.946Z (about 1 month ago)
- Topics: metrics, nim, nim-lang, nim-language, nimlang, statsd
- Language: Nim
- Size: 14.6 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
### StatsD client for Nim
image:https://img.shields.io/badge/status-beta-orange.svg[badge]
image:https://img.shields.io/github/tag/FedericoCeratto/nim-statsd-client.svg[tags]
image:https://img.shields.io/badge/License-LGPL%20v3-blue.svg[License]A simple, stateless StatsD client.
Documentation: https://federicoceratto.github.io/nim-statsd-client/0.1.1/statsd_client.html[module] https://federicoceratto.github.io/nim-statsd-client/0.1.1/theindex.html[index]
Install:
[source,bash]
----
nimble install statsd_client
----Usage example:
[source,nim]
----
import statsd_clientlet 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()
----