bitly / statsdaemon

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

Median is mislabeled as 'Mean' #1

Closed dgryski closed 11 years ago

dgryski commented 11 years ago

Copying https://github.com/bitly/gographite/issues/9 here because it's important. The summary statistic is either wrongly calculated or wrongly labelled.

Quoting: t[len(t)/2] is the median not the mean. The mean is the sum of the values divided by the number of values.

The fix is to either properly calculate the mean (which it looks like it was doing prior to 07fab0f9b46416c5c789c6d2fa0b503b8cff3f70 ) or rename the variable and the associated stat to 'median'.