Added configurable stats update interval #506
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As I mentioned in #505, I am proposing the ability to modify the update interval of the statistics file. Despite the compilation error due to issues in the unstable branch, I am submitting this PR to showcase the necessary code changes to declare the update-stats-frequency variable, which is an integer that defines how many seconds will pass before the file is updated. This file will then be read by Prometheus.
Now, it would only be necessary to add the global variable update-stats-frequency = x; in the configuration file (rtl_airband.conf) so that each user can control the frequency at which the statistics are updated. The modified code still maintains the default 15-second interval if this global variable is not specified, just like the original code does.
The reason for proposing this change is that having the option to configure a shorter update interval and allowing Prometheus to read these values more frequently enables more precise statistics, especially for analyzing signal and noise levels, for example.
Thank you, and I apologize for any mistakes that may exist. I'm not very experienced with Git and pull requests.