How to profile speed in each layer with RPC?

Also had the same problem. Check Profiling Report C++ for the solution presented there (both C++ and Python)