Profile your Python code with Scalene, then select the generated file profile.json.
Click demo to explore an example Scalene profile.
source code on Github