iovisor / bcc

BCC - Tools for BPF-based Linux IO analysis, networking, monitoring, and more
Apache License 2.0
20.36k stars 3.86k forks source link

Add the line "setlinebuf(stdout);" to avoid data output is not timely #5035

Closed zhangzihengya closed 3 months ago

zhangzihengya commented 3 months ago

It is recommended to add "setlinebuf(stdout);" to all tools.In order to avoid data output is not timely.If I can, I'll add this line of code to the other tools.

yonghong-song commented 3 months ago

Do you have a specific use case for this patch?

zhangzihengya commented 3 months ago

Do you have a specific use case for this patch?

At present, there is no concrete case, that is, in programming, I feel that adding this line of code is more friendly and real-time for the output, and has no other impact on other aspects of the code. I wonder if you are willing to join this line of code?