perf-tools
perf-tools copied to clipboard
- make cachestat compatible with older bash versions
Older versions of bash are not supporting the printf %(FORMAT)T format. I quickly added a date based subtraction.
If someone has time, he can also implement a version check and use the printf with newer bash versions (less overhead) and the date part with older.
Thank you, but no. I object to performance tools that themselves waste performance without a really good reason. This change would do an extra fork/exec for every interval. I understand the reason, but I don't think it's a really good one. I'd also not be that interested in code that checked the bash version and then made an appropriate choice -- obfuscating the script, without a really good reason.