tarjei / StatsDBundle

A bundle creating a StatsD client for use with Symfony2
MIT License
12 stars 2 forks source link

I don't understand why random at sampling #3

Closed liuggio closed 11 years ago

liuggio commented 11 years ago

Hello, Do you know why on the sampling there's the random function?

https://github.com/tarjei/StatsDBundle/blob/master/StatsD.php#L104

if ((mt_rand() / mt_getrandmax()) <= $sampleRate) {

Thanks

tarjei commented 11 years ago

The initial implenentation was done @ etsy, but I think the idea is that you do not report all datapoints - just a fraction to reduce load.

liuggio commented 11 years ago

Thanks a lot.

On Tue, Oct 30, 2012 at 9:03 AM, Tarjei Huse notifications@github.comwrote:

The initial implenentation was done @ etsy, but I think the idea is that you do not report all datapoints - just a fraction to reduce load.

— Reply to this email directly or view it on GitHubhttps://github.com/tarjei/StatsDBundle/issues/3#issuecomment-9897449.

__liuggio_____

/|_ We reject kings, presidents and voting. /o ) \/ We believe in rough consensus ) v _/\ and running code (I.E.T.F. credo)