a simple tool to monitor execution times of functions.
Project description
eprofiler
Execution profiler
a simple tool to monitor execution times of functions. can be installed from pypi
pip install eprofiler
https://pypi.org/project/eprofiler/
https://github.com/eyukselen/eprofiler
import timeit
function and use as a decorator for the function you want to monitor
if you pass an empty dict to it as below, you can get the results and use it in code.
otherwise it will print duration.
usage:
from eprofiler import timeit
print("without stats dict provided")
@timeit()
def my_func_to_test():
for x in range(100000):
y = x ^ 2
my_func_to_test()
stats = {}
print("without stats dict provided")
@timeit(stats)
def my_func_to_test_with_stats():
for x in range(100000):
y = x ^ 2
my_func_to_test_with_stats()
print(stats)
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
eprofiler-0.0.3.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for eprofiler-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f06ccef1595dbf81f61c632ffa4251d6904894ec86ddf475a25297e26ebaa636 |
|
MD5 | 8099291693af1120b708dca9cb774ef7 |
|
BLAKE2b-256 | 918e0148f24917d268c2b4ead1074ec8dc7531c2f25d5db024a7e0413a669e65 |