How to Profile an application (using OProfile)
From KratosWiki
Make sure that OProfile is installed in your Linux system. Type 'operf' to check it.
To profile your Kratos run, just follow 2 steps.
Step 1, collect the data:
operf python KratosMainScript.py
Contrl+C when you want, or wait until execution ends, then
Step 2, analyze the data:
opreport --callgraph