Skip to content
/ perfov Public

A simple Python class for measuring performance of processes.

License

Notifications You must be signed in to change notification settings

cobanov/perfov

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Perfov

A simple Python class for measuring performance of processes.

Installation

pip install perfov

Usage

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

Methods

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.

License

This project is licensed under the MIT License.

About

A simple Python class for measuring performance of processes.

Topics

Resources

License

Stars

Watchers

Forks

Languages