-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
utils: floating-point number support in size-to-bytes conversion #8767
utils: floating-point number support in size-to-bytes conversion #8767
Conversation
Signed-off-by: Meet <[email protected]>
Signed-off-by: Meet <[email protected]>
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.
Basically, the change looks attractive. But, is there any chance to add unit tests to verify whether this change is effective or not?
You can add your adding test(s) in https://github.com/fluent/fluent-bit/blob/master/tests/internal/utils.c.
Signed-off-by: Meet <[email protected]>
Okay, I've added a unit test for the change!! |
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.
Looks attractive. 👍
This PR addresses an issue, which is that the flb_utils_size_to_bytes function is only processing non-floating numbers even after providing a floating-number in configuration.
It would address one aspect of the performance issues (Ref: #8673)
[2024/04/23 18:34:22] [debug] [input:winevtlog:winevtlog.0] read limit per cycle is set up as 976.6K
[2024/04/23 18:42:00] [debug] [input:winevtlog:winevtlog.0] read limit per cycle is set up as 976.6K
Enter
[N/A]
in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-test
label to test for all targets (requires maintainer to do).Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.