pydoit / doit

CLI task management & automation tool
http://pydoit.org
MIT License
1.84k stars 175 forks source link

Add timing option for commands #428

Open dancingcactus opened 2 years ago

dancingcactus commented 2 years ago

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.

Fund with Polar