Skip to content

conradoad/PyProfTool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyProfTool

Overview

Just a little Python-code profiler tool, written only for the purpose of practise coding, packing and publishing on PyPi repository. It measure the frequency and duration of delimited pieces of code.

Installing

Run:

$ pip3 install PyProfTool

Usage example

Code:

from pyproftool import PyProfTool
import time

prof = PyProfTool('Profiling Example')
prof.enable()

prof.start_point('All code')

for _ in range(10):
    prof.start_point('Piece of code #1')
    time.sleep(0.1)
    prof.end_point('Piece of code #1')

for _ in range(5):
    prof.start_point('Piece of code #2')
    time.sleep(0.5)
    prof.end_point('Piece of code #2')

prof.end_point('All code')

prof.show()

Output:

Screenshot from 2022-08-28 16-06-39

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages