Installation • Usage •
pip install myprofiler
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
========================================