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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file measure_exec_time-0.10.tar.gz
.
File metadata
- Download URL: measure_exec_time-0.10.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bedab9b1bb189f972447f7c2f018324c9d99e74ca0d3a1b1f893c4ef9e484374 |
|
MD5 | b14340bb588db44c6bbc49ce117a6030 |
|
BLAKE2b-256 | 2c4f292fc339a6ef7f7c325143ff68743f402706dfd337c21d33db08903838ce |
File details
Details for the file measure_exec_time-0.10-py3-none-any.whl
.
File metadata
- Download URL: measure_exec_time-0.10-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef335c41d33002c82ec156ecae2dffd2e96462322eb2c7633911f993c9b1d746 |
|
MD5 | 4d91aefdd4672731f495e8eb3cfa7b20 |
|
BLAKE2b-256 | 6741f66a9c55715972c11f016c36ae719838df23c9a381854cf9b3ff662f37e4 |