Jaymon / captain

command line python scripts for humans

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

echo profile enhancements

Jaymon opened this issue · comments

It would be great to allow the use of echo.profile outside of the context manager, so you could do something like:

echo.profile_start()

# do some stuff

echo.profile_stop()

echo.out("Finished N rows in {}", echo.profile_elapsed())

Or something like:

with echo.profile(quiet=True):
    # do some stuff
echo.out("Finished N rows in {}", echo.profile_elapsed())

Likewise, it would be great if printing the elapsed time could display seconds if it is over 1000 ms