Skip to content
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

JSON exporter output cut short due to BufWriter size #359

Open
IncludeArthur opened this issue Feb 16, 2024 · 1 comment · Fixed by #382
Open

JSON exporter output cut short due to BufWriter size #359

IncludeArthur opened this issue Feb 16, 2024 · 1 comment · Fixed by #382
Labels
bug Something isn't working

Comments

@IncludeArthur
Copy link

Sometimes the output of the JSON exporter is cut short producing invalid JSON syntax that is difficult to parse.
If a timeout flag is specified, the exporter will eventually output all the data otherwise some data might be lost when Scaphandre is manually stopped. This happens both for stdout and file output.

I think that the problem is caused by the BufWriter default size of 8 KiB and the high amount of data produced by the JSON exporter.
I've also noticed that it takes a long time (up to 20 seconds on my hardware) between consecutive outputs leading to a lot of data accumulating in the buffer.

@IncludeArthur IncludeArthur added the bug Something isn't working label Feb 16, 2024
@bpetit bpetit linked a pull request Apr 22, 2024 that will close this issue
@bpetit
Copy link
Contributor

bpetit commented Apr 23, 2024

Hi !

Thank you for documenting this issue, I tried a PR including a different initialization of the BufWriter, setting the size of the buffer.

Let me know if you can try this branch before it makes it to dev, I'd love to hear feedbacks.

@bpetit bpetit added this to General Jun 19, 2024
@bpetit bpetit moved this to In progress in General Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

2 participants