Skip to content

Latest commit

 

History

History
59 lines (49 loc) · 1.27 KB

README.md

File metadata and controls

59 lines (49 loc) · 1.27 KB


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
========================================