Skip to main content

A minimal profiler for calculating memory usage and time

Project description


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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

myprofiler-0.0.1.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

myprofiler-0.0.1-py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page