bitly / statsdaemon

an implementation of Etsy's statsd in Go
The Unlicense
570 stars 131 forks source link

Relative gauges #40

Closed JamesCohen-awin closed 9 years ago

JamesCohen-awin commented 9 years ago

The etsy statsd implementation includes support for relative operations on gauges (see https://github.com/etsy/statsd/blob/master/docs/metric_types.md#gauges). I've attempted to duplicate this functionality.

I followed the statsd specs and retained the gauges as uint64 values.

This is my first attempt at coding in Go. Please be gentle!

mreiferson commented 9 years ago

I need to comb through the actual code, but it looks like it could use a little go fmt in the meantime.

Thanks for all these contributions @JamesCohen-awin

JamesCohen-awin commented 9 years ago

Thanks - didn't know about go fmt

JamesCohen-awin commented 9 years ago

rebased to current HEAD 1ac36f2

mreiferson commented 9 years ago

@JamesCohen-awin thanks again, this looks good functionally - just had a few style/go idiom nitpicks

JamesCohen-awin commented 9 years ago

Thanks - all of the suggestions made perfect sense

JamesCohen-awin commented 9 years ago

give me a sec and I'll squash all of this down into a single commit

JamesCohen-awin commented 9 years ago

I can't fix/squash/push fast enough ;)

Going to wait until you're done and re-push

mreiferson commented 9 years ago

P.S. in the future you don't have to squash as we're going through code review... What we normally do is wait for a PR to get to a "LGTM" stage and then squash.

Not only is this an easier back-and-forth, but it allows the reviewer to see the changes as individual commits as they're happening, rather than losing context.

mreiferson commented 9 years ago

and I think I got everything now :grin:

JamesCohen-awin commented 9 years ago

All sorted and thanks for the education

edit: just saw the bit about the LGTM too. Noted for next time.

mreiferson commented 9 years ago

awesome, nice work and thanks again for all your contributions!