in reply to RFC: Profiling your code.
And Memory Profiling?
That's outside the scope of my tutorial, but see Profiling memory and Memory Profiling. The short answer seems to be that there's not a tool to do this.