[Asterisk-code-review] StatsD: Add sample rate compatibility (asterisk[master])
Kevin Harwell
asteriskteam at digium.com
Tue Nov 10 10:50:55 CST 2015
Kevin Harwell 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>
> Inside of res_statsd.c, where this sends data to, if the sample rate is bet
I would suggest putting something similar (what you just stated) in the help text just to make it a little more clear.
Line 237: if (!isdigit(*sample_rate)) {
> So would isdigit have a problem with something like 0.5? The user is suppos
Passing a double to this function would essentially truncate everything after the decimal. Thus 0.5 would become 0.
You might be able to just use scanf here instead.
--
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