D
D
denislysenko2021-10-23 17:02:55
Python
denislysenko, 2021-10-23 17:02:55

How to test CPU load, Memory, runtime when running a program in Python?

There is a python file. This is a movie filtering software. You need to test this program.
The values ​​to be found are:

1) CPU load %
2) Memory
3) Execution time The execution

time of a program can be found in this way:

import time
start_time = time.time()
print("--- %s seconds ---" % (time.time() - start_time))


But how to get information about the load on the processor and memory?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Karabanov, 2021-10-23
@denislysenko

A high-precision CPU and memory profiler for Python

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question