Skip to content

hansalemaos/measure_exec_time

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Decorator for measuring the execution time of a callable

$pip install measure-exec-time
from measure_exec_time import measure_time
from time import sleep



@measure_time
def foo1():
    sleep(2)
    return 22





@measure_time(show_timedelta=False, show_start_end=True)
def foo2():
    sleep(2)
    return 22





@measure_time(show_timedelta=True, show_start_end=False)
def foo3():
    sleep(2)
    return 22


foo1()
print('----------')
foo2()
print('----------')
foo3()


    

About

Decorator for measuring the execution time of a callable

Topics

Resources

License

Stars

Watchers

Forks

Languages