I have a program that need to write in a file every second.
I thought there is a too much overhead if I open and close the file each time. So I decided to keep open the file io stream.
But I don't want to rely on my unreliable hunch.
How can I find the better way if I should keep file stream open or close by every additional writing?
I want to check in CentOS environment.