[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-bash] Profile bash script

From: Peng Yu
Subject: [Help-bash] Profile bash script
Date: Sat, 1 Dec 2018 06:09:33 -0600


I’d like to check how frequent each external command is called by a bunch
of bash scripts (one may call another). On way to do so is to hook a call
back function at the finish of the execution of each external command. But
I don’t see such a feature in bash.

Another way is to wrap around each possible external command with a command
of the same name which is in a directory prepended to $PATH. Those wrappers
will record the times they are called, then call the original command with
the same name. But this is cumbersome.

Is a good way to record how many times each external command is called?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]