I’m trying to create a custom profiler to see the performance inside builds and I want to recreate the same hierarchy tree as the one in profiler CPU usage with the calls and milliseconds.
ProfilerRecorder api allows you to the the total time of a particular marker for the whole frame. The usecase for this is to have timings for a selected activities/areas in your game.
If you would like to capture all instrumentation events in Unity you can use native IUnityProfilerCallbacks API callbacks. That way you can measure all timings yourself and build a similar view inside and outside builds.