Skip to content

a simple profiler for calculating total execution time and memory usage

License

Notifications You must be signed in to change notification settings

amirbahador-hub/myprofiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


MyProfiler

A minimal profiler for calculating total execution time and memory usage

TestBadge PythonVersionBadge

InstallationUsage

Installation

pip install myprofiler

Usage

from myprofiler import profile

@profile
def main():
    lt = []
    for i in range(0, 100000):
        lt.append(i)

if __name__ == "__main__":
    main()

output:

========================================
---- Meta Data ----
Function: main
Method: None
---- Memory Usage ----
Current memory usage:	 936.0B
Peak memory usage:	 3.4MiB
---- Time ----
Total Time:	 0:00:00.039728
seconds:	 0
microseconds:	 39728
========================================

About

a simple profiler for calculating total execution time and memory usage

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published