Skip to content

Commit

Permalink
Merge pull request statsd#135 from mattspitz/master
Browse files Browse the repository at this point in the history
More Java client improvements.
  • Loading branch information
mrtazz committed Aug 6, 2012
2 parents 4682f7f + e285d3a commit 5a36ca0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/StatsdClient.java
Expand Up @@ -4,7 +4,7 @@
* (C) 2011 Meetup, Inc.
* Author: Andrew Gwozdziewycz <andrew@meetup.com>, @apgwoz
*
*
*
*
* Example usage:
*
Expand All @@ -22,7 +22,7 @@
* // multiple keys with a sample rate
* client.increment(10, .1, "foo.bar.baz", "foo.bar.boo", "foo.baz.bar");
*
* Note: For best results, and greater availability, you'll probably want to
* Note: For best results, and greater availability, you'll probably want to
* create a wrapper class which creates a static client and proxies to it.
*
* You know... the "Java way."
Expand Down Expand Up @@ -111,11 +111,11 @@ public boolean increment(int magnitude, double sampleRate, String... keys) {
return send(sampleRate, stats);
}

public boolean gauge(String key, int magnitude){
public boolean gauge(String key, double magnitude){
return gauge(key, magnitude, 1.0);
}
public boolean gauge(String key, int magnitude, double sampleRate){

public boolean gauge(String key, double magnitude, double sampleRate){
final String stat = String.format(Locale.ENGLISH, "%s:%s|g", key, magnitude);
return send(sampleRate, stat);
}
Expand Down

0 comments on commit 5a36ca0

Please sign in to comment.