Net::Statsite::Client - Object-Oriented Client for statsite server
use Net::Statsite::Client; my $statsite = Net::Statsite::Client->new( host => 'localhost', prefix => 'test', ); $statsite->increment('item'); #increment key test.item
Net::Statsite::Client is based on Etsy::StatsD but with new - new interface and unique method.
new
unique
Create a new instance.
host - hostname of statsite server (default: localhost)
port - port of statsite server (port: 8125)
sample_rate - rate of sends metrics (default: 1)
prefix - prefix metric name (default: '')
proto - protocol (default: 'udp')
Log timing information (should be in miliseconds)
Increment one of more stats counters.
Decrement one of more stats counters.
Update one of more stats counters by arbitrary amounts.
Unique Set
For example if you need count of unique ip adresses (per flush interval) $stats->unique('ip.unique', $ip);
Gauge Set (Gauge, similar to kv but only the last value per key is retained)
Sending logging data; implicitly called by most of the other methods.
the easiest way is use docker (avastsoftware/perl-extended - with Carton and Minilla)
or Carton and Minilla itself (commands after ../perl-extended)
Minilla
../perl-extended
carton (aka ruby bundle) for fetch dependency
docker run -v $PWD:/tmp/app -w /tmp/app avastsoftware/perl-extended carton
and minil test for tests and regenerate meta and readme
docker run -v $PWD:/tmp/app -w /tmp/app avastsoftware/perl-extended carton exec minil test
Copyright (C) Avast Software.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Jan Seidl <seidl@avast.com>
To install Net::Statsite::Client, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Statsite::Client
CPAN shell
perl -MCPAN -e shell install Net::Statsite::Client
For more information on module installation, please visit the detailed CPAN module installation guide.