-
Notifications
You must be signed in to change notification settings - Fork 456
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
CRI log parser improvements #228
Comments
@Random-Liu What do you think about this? |
That is util function used in the validation test, and performance shouldn't be a problem there. But feel free to send a PR to improve it. :) Thanks!
Agree. |
I think we can close this one. |
The function
parseCRILog
might have some room to introduce some changes to make it more performance as callingstrings.Fields
only once at the beginning of the method should be more efficient. I think it could even be more efficient if we usestrings.SplitN
as I think we do not need to split the whole message.Likewise, it would be good to check the resulting array to make sure it has the correct or the expected size and avoid errors when accessing different fields, for example
2016-10-06T00:17:10.113242941Z stdout
as an input would cause panic.If we use
strings.SplitN
then we wouldn't needstrings.Join
.The text was updated successfully, but these errors were encountered: