-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add configurable burst filter time #17
Add configurable burst filter time #17
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with the intention of this PR, but the implementation has some minor things I'd like to see changed including having a single definition of the default burst timeout. Inline comments below.
2ac2e42
to
cca9515
Compare
Parameter can be specified on caPutLogInit, caPutLogReconf or independently during runtime by caPutLogBurstTimeout()
1e0d14d
to
98b12b5
Compare
This seems to be a bit awkward to get to compile for older c++ versions; for c++11, you can use ```c static constexpr double default_burst_timeout = 5.0; ``` but for older c++ (with no `constexpr`) this is not valid; moreover, both of ```c const double default_burst_timeout = 5.0; static const double default_burst_timeout = 5.0; ``` fail for different reasons. Given that this timeout is only used in one place this seems like the simplest fix.
98b12b5
to
266341f
Compare
@anjohnson All of the issues should be addressed. I ended up directly assigning the const double default_burst_timeout = 5.0;
static const double default_burst_timeout = 5.0;
static constexpr double default_burst_timeout = 5.0; all fail in different cases. Who knew floats were such an issue? 🙃 |
One more request (sorry!); please document the new iocsh commands & arguments here and add a release note entry mentioning the changes. If this PR hasn't been rebased recently you'll want to do that first, I added release notes for the other recent changes last week. |
Documentation and release notes updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks good to go now.
This PR introduces a way to configure the burst filter timeout in runtime, thus allowing users to match the burst filter to their application needs.
Introduces one new function for each logger implementation:
caPutLogSetBurstTimeout(<timeout>)
caPutJsonLogSetBurstTimeout(<timeout>)
This parameter can also be passed in the initialization or reconfiguration functions:
caPutLogInit(<address>[:port], <interest level>, <timeout>)
caPutLogReconf(<interest level>, <timeout>)
caPutJsonLogInit(<address>[:port], <interest level>, <timeout>)
caPutJsonLogReconf(<interest level>, <timeout>)