A simple Python class for measuring performance of processes.
pip install perfov
Here's an example of how you can use Perfov in your code:
from perfov import Perfov
perfov = Perfov()
perfov.start()
perfov.checkpoint(label="Rendering")
perfov.checkpoint(label="Burning")
perfov.finish()
The above code will output the following results:
Performance Results:
Rendering: 0.12 seconds
Burning: 0.23 seconds
Total time: 0.35 seconds
Perfov has the following methods:
-
start(): Mark the start time of the performance measurement.
-
checkpoint(label): Create a checkpoint for a specific process, where label is a string that describes the process.
-
finish(): Print the total elapsed time for all processes.
This project is licensed under the MIT License.