python check how much application consuming cpu code example
Example 1: how to measure how much your of cpu your program is using in python
$ pip install memory_profiler
Example 2: how to measure how much your of cpu your program is using in python
$ pip install line_profiler