As you work on more and more complex projects, especially in compiled languages or long running simulations, etc., commands take longer and longer to run. And to know that these commands may be bottlenecks worth optimizing (parallelizing tests and simulations, getting a system like ccache for speeding up compiles), you need to know how long these commands are taking.
Running everything through
time is a pain, and nobody can remember to do that every time they run a command. Luckily, has a built in way to do just that in a non-obtrusive way. Say you would like to know whenever a shell command has taken longer than 10 seconds to run. Set
REPORTTIME to 10 in your
.zshrc, like so:
And then, every time you run a command that takes longer than 10 seconds, the command will display the time it took as if you ran it through