Search Unity

Stats window vs profiler disagreement

Discussion in 'Global Illumination' started by ArachnidAnimal, May 26, 2020.

  1. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,835
    I'm using Unity 2017.4 with Realtime GI.
    I'm trying to track the performance.
    The stats window CPU usage and profiler are giving wildly conflicting information:

    ss.png

    Stats CPU: 32ms
    Profiler GI: 66ms

    Does anyone know which one is accurate?

    .
     
  2. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,457
    The Profiler. But don't look at the GI profiler module for this (and if you do, please toggle the "total" category off. That really should be removed as it just sums up the other categories) but at the CPU Usage module.

    The reason is that the stats window is calculating the frame time and fps solely on the Player loop time and ignoring the EditorLoop around it, making this only an estimate of what it might be in a build player, inwhich the timings will be different and you might have "worse" than estimated performance due to the platform differences, screensize or because you are now waiting for the GPU when the GPU was able to do everything in the time the EditorLoop took in the Editor.
     
    ArachnidAnimal likes this.