Skip to main content

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.5.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

eprofiler-0.0.5-py3-none-any.whl (2.9 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