Skip to content

Commit

Permalink
added gauge function
Browse files Browse the repository at this point in the history
  • Loading branch information
stuintrepica committed May 1, 2012
1 parent 5210574 commit f379633
Show file tree
Hide file tree
Showing 5 changed files with 401 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/statsd.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ Client.prototype.decrement = function (stats, sample_rate) {
self.update_stats(stats, -1, sample_rate);
}

Client.prototype.gauge = function (stat, value, sample_rate) {
var self = this;
var stats = {};
stats[stat] = value+"|g";
self.send(stats, sample_rate);
}

Client.prototype.update_stats = function (stats, delta, sampleRate) {
var self = this;
if (typeof(stats) === 'string') {
Expand Down
1 change: 1 addition & 0 deletions node_modules/mersenne/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

283 changes: 283 additions & 0 deletions node_modules/mersenne/lib/mersenne.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions node_modules/mersenne/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f379633

Please sign in to comment.