taskipy icon indicating copy to clipboard operation
taskipy copied to clipboard

Add option to print out execution time of tasks

Open emann opened this issue 1 year ago • 2 comments

I'm working on trying to optimize some of our CI/CD + compare performance of a couple tools, would be really nice if there was a commandline option to print out how long each task takes to run. Would be more than happy to implement myself if there is interest.

My thinking is something like a --show-execution-time arg or something similar that would print out

<output of lint task>
-- ran task "lint" in 12.34s --

For composed tasks (tasks that call other tasks) it would still print out the execution time per-task, but at the end print the total time to execute i.e. given a task "check: which calls tasks "lint" and "test",

<output of lint task>
-- ran task "lint" in 12.34s --
<output of test task>
-- ran task "test" in 56.78s --
-- ran task "check" in 69.12s --

emann avatar Apr 26 '23 16:04 emann

Hey! Thanks for your input. This sounds like a really nice feature. Will you be willing to contribute?

illBeRoy avatar May 05 '23 14:05 illBeRoy

I'd love to! I'll draft up a PR in the next few days 🚀

emann avatar May 05 '23 15:05 emann