I am using the unity profiler to measure performance of my demo. However I am having a hard time understanding the values output. I’ll just use the below links profiler pic:
In the first image here it says CPU:0.51ms GPU:1.10ms.
I know these values are in milliseconds, but what do they mean? 0.51ms to do what?
Am I correct in assuming that the total percentage of camera.render, 41.1%, means that of the 0.51ms, 41.1% of that is camera.render?
In the graph area we have 4ms(250fps) and 1ms(1000fps), again what do these values mean? Is it that if a spike hits here it took 4ms to process whatever happened?
The CPU took 0.51ms to loop from one frame to the next. The GPU took 1.1ms to render the scene.
Yes, 41.1% of the CPU time was spent inside Camera.Render().
The graph shows how the performance is varying from frame to frame. The graph is showing the performance is varying between less than 1ms, and more than 1ms. In the frames that are less than 1ms, the frame rate will be faster than 1000fps. In the occasional spike the framerate will be closer to (probably) 500fps. If the spike did hit the 4ms line, then you’d get a fps of 250fps. Note that this profiler window is showing a scene which is probably rendering nothing at all, so the time around the frame loop is very very fast, and the GPU is probably only clearing the frame buffer and rendering a blue background.