Change the Exec output to use BatchSerialize() #6446
Merged
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.
Required for all PRs:
Solves #6445
When the exec output serialises the metrics it does it one by one and writes it to the buffer. Error checking is done on the serialising but not the writing into the buffer. So there is no reason to not use the batch serialiser.
When developing against the output exec I expected the output to follow the rules of the data format that I specified. For my use case I am using JSON and expected a list of metrics but was unfortunately greeted with a multiple lines of single metrics, making it extremely difficult to render the metrics again.
Sample of bad output:
This PR removes the looping over the metrics and rather just use the batch serialise function.