Skip to main content

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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

miniprofiler-0.0.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

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

Hashes for miniprofiler-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b95b97b4cb16216c1a3dde225568d83e65211e66deb946e674f80245049d0b07
MD5 21ac85322d6e7b0b820250c91cc7c112
BLAKE2b-256 0b994921b1783b2ac873836f6c803c94166605822398f7da66f0b977a19c10f6

See more details on using hashes here.

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

Hashes for miniprofiler-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cd5ac2208604d1e5751e91f1f9fc73c30cd62358b328bba8e12ecd95959cd453
MD5 a621a6eea84dfa126a345532964d62c4
BLAKE2b-256 0f5f2df984e399af57bee2925395f0f89ec1e7a8cbad5da7b0cb11af563004e9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page