...no requests were done, fixes #212
I did basic testing and it looks ok, please review
--carbon-idle-avg none - don't push any avg_rt value if no requests were made
--carbon-idle-avg last - use last computed avg_rt value (default)
--carbon-idle-avg zero - push 0 if no requests were made
adds ability to control what values (if any) for avg_rt will be sent …
…if no requests were done, fixes #212
i am not sure to understamd the problem here, it is better to not send avg when it is zero ?
if you want to accurately average some metrics than you want only those metrics, if there are no requests than sending zero will move average values toward zero.
Example: during 10 minutes you only have 2 requests serviced in 1 second each, so we should have 1s (1+1/2) avg_rt average, but sending zeros will gives us 0.2s (1+1/10).
Number of samples counts in average computation, so we should not send any metrics for time periods with no requests