Mini profiler tool for your projects
Project description
miniprofiler
Mini profiling tool for your projects
Usage
from miniprofiler import Profiler
profiler = Profiler()
profiler.register("render")
# Collect N samples, this can be an unlimited loop as well
# for example your game loop
for _ in range(N):
with profiler.profile("render"):
# Your rendering code goes here
stat = profiler["render"]
print(f"Rendering took {stat.avg} seconds on average, with a minimum time of {stat.min} seconds.")
Installation
Install via PyPI:
$ pip install miniprofiler
or just copy miniprofiler.py into your project.
License
MIT © Kadir Aksoy
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
miniprofiler-0.0.1.tar.gz
(3.7 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
File details
Details for the file miniprofiler-0.0.1.tar.gz.
File metadata
- Download URL: miniprofiler-0.0.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b95b97b4cb16216c1a3dde225568d83e65211e66deb946e674f80245049d0b07
|
|
| MD5 |
21ac85322d6e7b0b820250c91cc7c112
|
|
| BLAKE2b-256 |
0b994921b1783b2ac873836f6c803c94166605822398f7da66f0b977a19c10f6
|
File details
Details for the file miniprofiler-0.0.1-py3-none-any.whl.
File metadata
- Download URL: miniprofiler-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd5ac2208604d1e5751e91f1f9fc73c30cd62358b328bba8e12ecd95959cd453
|
|
| MD5 |
a621a6eea84dfa126a345532964d62c4
|
|
| BLAKE2b-256 |
0f5f2df984e399af57bee2925395f0f89ec1e7a8cbad5da7b0cb11af563004e9
|