timeitX - Function Execution Time Logger
Project description
timeitX - Function Execution Time Logger
timeitX is a Python decorator that logs the execution time of functions, both for synchronous and asynchronous functions.
Features
- Log the execution time of functions.
- Supports both synchronous and asynchronous functions.
- Customizable function names for logging.
- Precision down to milliseconds.
- Easy to integrate with your Python projects.
Installation
You can install timeitX via pip:
pip install timeitX
Usage
from timeitX import timeitX
# Define your logger
import logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger("timeitX")
@timeitX(name="My Function", logger=logger)
def my_function():
# Your function code here
# For asynchronous functions
@timeitX(name="Async Function", logger=logger)
async def async_function():
# Your async function code here
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
timeitx-1.0.2.tar.gz
(6.1 kB
view details)
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
timeitx-1.0.2-py3-none-any.whl
(11.2 kB
view details)
File details
Details for the file timeitx-1.0.2.tar.gz.
File metadata
- Download URL: timeitx-1.0.2.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.0 CPython/3.9.18 Linux/6.2.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a42d519d38f27b474917c3f104ecdbfe0e07f6dc65cf777bbb2c87d7c7e81b20
|
|
| MD5 |
749ece1f2ebb49086691862565cdabce
|
|
| BLAKE2b-256 |
d9867568c76d5ccede491801291dca6efbbd086186f84e8c55413bf6dfcb96c4
|
File details
Details for the file timeitx-1.0.2-py3-none-any.whl.
File metadata
- Download URL: timeitx-1.0.2-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.0 CPython/3.9.18 Linux/6.2.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc3b34b1505f36d570f8904819f2512b5a6383a1b77b0a4c0f321bdc9c99e479
|
|
| MD5 |
eaed976ad0250d4ed348263f50c4b888
|
|
| BLAKE2b-256 |
f73033ab4fb54a7baf404c9c7a8eb5eb917f148bca32e537c64214c7435b2484
|