This python impolementation is based on the "Basic instrumentation profiler" by Cherno. The orginal code is written in Cpp and for CPP project. But this version would be used for python only. Use chrome://tracing/ and open the file by Chrom to see the timming you get from running the script.
Mariwan Jalal 2021-11-23