# miniprofiler
Mini profiling tool for your projects.



# Usage
```py
from miniprofiler import Profiler

profiler = Profiler()

# 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:
```shell
$ pip install miniprofiler
```
or just copy-paste `miniprofiler` into your project.



# License
[MIT](LICENSE) © Kadir Aksoy