doit icon indicating copy to clipboard operation
doit copied to clipboard

Add timing option for commands

Open dancingcactus opened this issue 3 years ago • 0 comments

First off I LOVE doit. Such a brilliant piece of tech and a real-timesaver.

I have a lot of tasks that take multiple minutes to run. These are things like training machine learning models and converting large files into different formats. One thing I am working on now is optimizing the training pipeline so that it takes less time. I would LOVE to be able to add a flag to get the amount of time it takes a command/sub command takes to run.

The idea would be to do something like (assuming I have a command called train).

doit train --timing then it would print out . train - 2:30 minutes

or it I had multiple tasks

-- prep - 0 seconds
. convert - 23 Seconds
. train - 2:21 Minutes 

While I could use timeit for most of the python tasks. Most of the tasks I have are command line tasks.

dancingcactus avatar Jun 15 '22 02:06 dancingcactus