Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joemiller/groovy-statsdclient
A statsd client written in groovy
https://github.com/joemiller/groovy-statsdclient
Last synced: 13 days ago
JSON representation
A statsd client written in groovy
- Host: GitHub
- URL: https://github.com/joemiller/groovy-statsdclient
- Owner: joemiller
- Created: 2011-06-29T23:38:15.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-06-29T23:41:48.000Z (over 13 years ago)
- Last Synced: 2023-03-11T06:58:08.941Z (over 1 year ago)
- Language: Groovy
- Homepage: http://joemiller.me
- Size: 93.8 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
groovy StatsdClient
===================A groovy client for [StatsD](https://github.com/etsy/statsd), Etsy.com's daemon for aggregating
statistics (counters and timers), rolling them up, then sending them to [graphite](http://graphite.wikidot.com)Usage
-----
The usage is very similar to statsd clients in other languages, including support for 1 or more stats
in a single call as well as sampling. By default, sampling is disabled.
s = new StatsdClient("localhost", 8125)
s.timing( "test.timing", 300 )
s.timing( "test.timing.sampled", 200, 0.1 )
s.timing( ["test.first.timing", "test.second.timing"], 100 )
s.timing( ["test.first.timing.sampled", "test.second.timing.sampled"], 100, 0.5 )s.increment( 'increment.by.one' )
s.increment( 'increment.by.some.value', 20 )
s.increment( 'increment.by.some.value.and.sampled', 20, 0.5 )
s.increment( ['increment.by.one.First', 'increment.by.one.Second' ] )
s.increment( 'decrement.by.one' )
s.increment( 'decrement.by.some.value', -20 )
s.increment( 'decrement.by.some.value.and.sampled', -20, 0.5 )
s.increment( ['decrement.by.one.First', 'decrement.by.one.Second' ] )
Run the above script: `groovy -cp groovy-statsdclient.jar script.groovy`Downloading
-----------
A pre-built jar can be downloaded by clicking on the 'Downloads' link of the github page:
http://github.com/joemiller/groovy-statsdclientBuilding
--------
1. Download and install gradle
2. Fetch the latest code: `git clone git://github.com/joemiller/groovy-statsdclient.git`
3. Run the tests using: `gradle test`
4. Build the jar using: `gradle jar`You will find the built jar in `./build/libs`.
Todo / Future
-------------
1. Add to maven central.
2. Once in maven central, document how the lib can be used with maven, gradle and Grape/@GrabLicense
-------
Copyright 2011 Joe MillerLicensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.