This package provides a decorator function `timejob` that can be used to measure the execution time of other functions in Python.
Project description
Timejob
This package provides a decorator function timejob that can be used to measure the execution time of other functions in Python.
Installation
You can install this package using pip:
pip install timejob
Usage
To use the timejob decorator, simply import it from the package and apply it to the function you want to measure:
from timejob import timejob
def fibonacci(n):
if n <= 1:
return n
else:
return fibonacci(n-1) + fibonacci(n-2)
@timejob
def show(value: int):
result = fibonacci(value)
print(f"result fibonacci:{result}")
show(1)
show(10)
show(20)
When you run my_function, the decorator will print the execution time in seconds to the console.
License This package is licensed under the MIT License
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file timejob-0.0.1.tar.gz.
File metadata
- Download URL: timejob-0.0.1.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32032295e8026b8f9333e9b393067c1f168aaae0ed3d6a4378227fddb143414f
|
|
| MD5 |
b773bc8fb951679fbd99f49fada8fe03
|
|
| BLAKE2b-256 |
54c4d6ea845bfc727b2686fc6da34bcb80aba995afba037563763d9ddb9ad21b
|
File details
Details for the file timejob-0.0.1-py3-none-any.whl.
File metadata
- Download URL: timejob-0.0.1-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a47595d7da5c71fa26e469b519029ced0180ec9aa67de48b0c82990e451adc97
|
|
| MD5 |
eee8e93eaa3063388e1daa167a0c8c7c
|
|
| BLAKE2b-256 |
878a1538aab984925a8a585d7cd5f167c8aff878f4db74f65ee07cbb403f33c6
|