Comparing version 0.0.11 to 0.1.1
@@ -478,3 +478,3 @@ var dgram = require('dgram') | ||
if (this.last_used_timer) { | ||
cancelTimeout(this.last_used_timer); | ||
clearTimeout(this.last_used_timer); | ||
this.last_used_timer = undefined; | ||
@@ -640,2 +640,2 @@ } | ||
module.exports = Lynx; | ||
module.exports = Lynx; |
@@ -1,31 +0,47 @@ | ||
{ "name" : "lynx" | ||
, "description" : "Minimalistic StatsD client for Node.js programs" | ||
, "version" : "0.0.11" | ||
, "author" : "Lloyd Hilaiel" | ||
, "contributors": [ "Nuno Job <nunojobpinto@gmail.com> (http://nunojob.com)" ] | ||
, "scripts" : { "test": "tap tests/*-test.js" } | ||
, "repository" : | ||
{ "type" : "git" | ||
, "url" : "git://github.com/dscape/lynx.git" | ||
} | ||
, "bugs" : { "web" : "https://github.com/dscape/lynx/issues" } | ||
, "directories" : { "lib" : "./lib/" } | ||
, "main" : "./lib/lynx" | ||
, "keywords" : | ||
[ "stats" | ||
, "metrics" | ||
, "metricsd" | ||
, "statsd" | ||
, "etsy" | ||
, "statsd client" | ||
, "statsd driver" | ||
, "graphite" | ||
] | ||
, "devDependencies": { "tap" : "~0.3.2" } | ||
, "dependencies" : { "mersenne" : "~0.0.3", "statsd-parser": "~0.0.4" } | ||
, "licenses" : | ||
[ { "type" : "MIT" | ||
, "url" : "http://github.com/dscape/lynx/raw/master/LICENSE" | ||
{ | ||
"name": "lynx", | ||
"description": "Minimalistic StatsD client for Node.js programs", | ||
"version": "0.1.1", | ||
"author": "Lloyd Hilaiel", | ||
"contributors": [ | ||
"Nuno Job <nunojobpinto@gmail.com> (http://nunojob.com)", | ||
"Mark Bogdanoff (https://github.com/bog)" | ||
], | ||
"scripts": { | ||
"test": "tap tests/*-test.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/dscape/lynx.git" | ||
}, | ||
"bugs": { | ||
"web": "https://github.com/dscape/lynx/issues" | ||
}, | ||
"directories": { | ||
"lib": "./lib/" | ||
}, | ||
"main": "./lib/lynx", | ||
"keywords": [ | ||
"stats", | ||
"metrics", | ||
"metricsd", | ||
"statsd", | ||
"etsy", | ||
"statsd client", | ||
"statsd driver", | ||
"graphite" | ||
], | ||
"devDependencies": { | ||
"tap": "~0.3.2" | ||
}, | ||
"dependencies": { | ||
"mersenne": "~0.0.3", | ||
"statsd-parser": "~0.0.4" | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "http://github.com/dscape/lynx/raw/master/LICENSE" | ||
} | ||
] | ||
} | ||
} |
@@ -50,2 +50,21 @@ # lynx | ||
### Sampling | ||
If you want to track something that happens really, really frequently, it can overwhelm StatsD with UDP packets. To work around that, use the optional sampling rate for metrics. This will only send packets a certain percentage of time. For very frequent events, this will give you a statistically accurate representation of your data. | ||
Sample rate is an optional parameter to all of the metric API calls. A valid sample rate is 0.0 - 1.0. Values of 0.0 will never send any packets, and values of 1.0 will send every packet. | ||
In these examples we are samping at a rate of 0.1, meaning 1-in-10 calls to send a sample will actually be sent to StatsD. | ||
``` | ||
var metrics = new lynx('localhost', 8125); | ||
metrics.increment('node_test.int', 0.1); | ||
metrics.decrement('node_test.int', 0.1); | ||
metrics.timing('node_test.some_service.task.time', 500, 0.1); | ||
metrics.gauge('gauge.one', 100, 0.1); | ||
metrics.set('set.one', 10, 0.1); | ||
var timer2 = metrics.createTimer('node_test.some_service.task2.time', 0.1); | ||
timer2.stop(); | ||
``` | ||
### Streams | ||
@@ -52,0 +71,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
42200
1227
173