perf-tools icon indicating copy to clipboard operation
perf-tools copied to clipboard

- make cachestat compatible with older bash versions

Open Sinnohd opened this issue 9 years ago • 1 comments

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.

Sinnohd avatar Sep 08 '15 16:09 Sinnohd

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.

brendangregg avatar Sep 08 '15 17:09 brendangregg