DStatsD - A fast, memory efficent, vibe.d compatible client for etsy's statsd.

Atila Neves via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Tue Oct 11 05:47:55 PDT 2016


On Monday, 10 October 2016 at 08:47:54 UTC, Robert burner Schadek 
wrote:
> http://code.dlang.org/packages/dstatsd
>
> StatsD allows to collect statistics about any application by 
> using counters, gauges and more through UDP.
>
> Usage:
>
> auto s = new StatsD("127.0.0.1", 1234, ""); // connect to 
> statsd server
>
> s(Counter("Foo")); // increment counter "Foo"
> s.inc("Bar"); // increment counter "Foo"
>
> s(Counter("Args"), // send stats to Args, H, and timeA
>   Counter("H", someIntValue),  // in one UDP message
>   Timer("timeA", someTimeInMS)
> );
>
> {
>   auto a = ScopeTimer("args", s); // automatic time collection
> }

I didn't even know that this existed, and I have a feeling that 
soon I'll wonder how I lived without it. Awesome!

Atila


More information about the Digitalmars-d-announce mailing list