Skip to main content

Decorator for measuring the execution time of a callable

Project description

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()


    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

measure_exec_time-0.10.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

measure_exec_time-0.10-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page