amirbahador-hub / myprofiler

a simple profiler for calculating total execution time and memory usage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


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

License:MIT License


Languages

Language:Python 92.4%Language:Shell 7.6%