I have an image processing shell script that can be provided with different sets of parameters that all produce a valid output for me. I'm trying to identity the set of parameters that has the lowest resources (CPU/RAM) usage as this script is going to run on the cloud. Are there any tools I can use to benchmark? I'm looking for something that would give me the total cpu cycles used by the script or any other relevant data/metric that I could compare.
OS: Ubuntu 20.04, Shell: BASH
Example of what I am looking for:
magical-benchmark-tool -c pdftoppm -png test.pdf test
Output
time (seconds) processor cycles max memory used (MB) mean memory used (MB)
-------------- ---------------- -------------------- --------------------
19 1253 250 128
Thank you!