@license
Project description
timedfunc
An easy way to measure execution time of Python functions using decorators.
Installation
pip install timedfunc
Example
from timedfunc import timedfunc
@timedfunc
def my_function(x):
print("doing stuff that takes some time...")
import time
time.sleep((x + 1) * 0.100) # simulate a computation
for i in range(3):
my_function(i)
output:
doing stuff that takes some time...
doing stuff that takes some time...
doing stuff that takes some time...
--------------------------------+----------+--------------+--------------+--------------
timed functions | calls | min | mean | max
--------------------------------+----------+--------------+--------------+--------------
my_function | 3 | 0.103 ms | 0.204 ms | 0.308 ms
--------------------------------+----------+--------------+--------------+--------------
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
timedfunc-1.1.tar.gz
(3.2 kB
view hashes)
Built Distributions
Close
Hashes for timedfunc-1.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d566500886ad30cbf4702cd93d00fdd534f306622ed2a0621d89c8036bd6a9e0 |
|
MD5 | e16afed3cd980e4344b52f627c025cfc |
|
BLAKE2b-256 | ce47b127fdc4d08ec274b1122ffdc330dd5913fa3d198c82836d8dd420a5c5ba |
Close
Hashes for timedfunc-1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 397df675de50eee5340d1853462e2e6a3db05439c8d5bcc0a51cb63d1b0127cd |
|
MD5 | 82ade07cee4f16d3459310f4db284b12 |
|
BLAKE2b-256 | 00f1d5be793b415574b64f635876964d239f6ba213c246ad565b8e84afd37e93 |