[Asterisk-code-review] StatsD: Add sample rate compatibility (asterisk[master])

Tyler Cambron asteriskteam at digium.com
Tue Nov 10 07:42:11 CST 2015


Tyler Cambron has posted comments on this change.

Change subject: StatsD: Add sample rate compatibility
......................................................................


Patch Set 1:

(2 comments)

https://gerrit.asterisk.org/#/c/1571/1/apps/app_statsd.c
File apps/app_statsd.c:

Line 64: 				greater than or equal to 1 will always be sent, and any rate
       : 				between 1 and 0 will be left up to chance.</para>
> This sounds a bit odd. What does "left up to chance" mean?
Inside of res_statsd.c, where this sends data to, if the sample rate is between 1 and 0, then it is compared to a randomly generated value between 1 and 0. If it is larger than the random value, the data gets sent. If it is smaller, then it is not sent. I stole the wording from res_statsd.c because I wasn't sure how to state this.


Line 237: 	if (!isdigit(*sample_rate)) {
> Is it suppose to be possible for the user to enter the sample rate as a dou
So would isdigit have a problem with something like 0.5? The user is supposed to be able to enter the sample rate as a double to provide values between 1 and 0.


-- 
To view, visit https://gerrit.asterisk.org/1571
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I11d315d0a5034fffeae1178e650aa8264485ed52
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Tyler Cambron <tcambron at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Tyler Cambron <tcambron at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list