Custom measuring points in profiler

I would like to be able to add custom data points in the profiler to measure performance of individual parts of my code. As I see it it would be something like

profiler.start(“pathfinding”)

profiler.end(“pathfinding”)

And that would give me an additional bar in the chart that shows how much time has gone into pathfinding each frame.

Being able to break down the script execution into files and function and as you suggest custom chunks of code would be a nice addition to the profiler.