-
Notifications
You must be signed in to change notification settings - Fork 3
/
README
47 lines (27 loc) · 1.32 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
About
---------------------------------------------------------------------------------
luastatsd is a lua client library to the etsy/statsd statistics daemon.
For more info, see :
* http://codeascraft.etsy.com/2011/02/15/measure-anything-measure-everything/
* https://github.com/etsy/statsd
---------------------------------------------------------------------------------
Usage
---------------------------------------------------------------------------------
To use this library you must first have a statsd server running on your network.
Before you can use the library it must be initialized with the host and port of
your statsd server
require 'statsd'
metrics = statsd(host, port)
To record a count of an event:
metrics:recordCount(metric-name, value, frequency)
To time a block of code:
metrics:startTimer(timerName)
... code ...
metrics:stopTimer(timerName)
Then initialize the library with the host and port of your statsd server:
---------------------------------------------------------------------------------
Copyright
---------------------------------------------------------------------------------
This code is Copyright 2012 Zipline Games LLC.
See the accompanying LICENSE file for use and distribution legalese.
---------------------------------------------------------------------------------