Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Question How to show 3 decimal places at profiler hierarchy

Discussion in 'Profiler Previews' started by optimise, Jan 25, 2023.

  1. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Currently at profiler hierarchy it only shows 2 decimal places like 0.01ms. Any way to make it show in 3 decimal places like 0.001ms?
     
  2. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,455
    Hello,

    There is currently no way of doing so. You could load the profiler data into the Profile Analyzer which offers more detailed insights and multiple frame spanning analysis.

    I've logged your question as feedback though.
     
    optimise likes this.
  3. Gotmachine

    Gotmachine

    Joined:
    Sep 26, 2019
    Posts:
    37
    The Unity profiler is not reliable enough for micro-profiling.

    First, no matter if you profile in the editor or in a built player, you're running with many fundamental mono optimizations disabled and you're running a version of the native unity code that has a ton of overhead.

    Moreover, measuring call time on the order of 0.01ms or less is completely unreliable over a single call, you need to average results over hundred of calls (and ideally over multiple sessions) to get a reliable figures, especially if you intend to compare those figures between implementation variants.

    The profile analyzer does provide good tools for the latter, but you still need to keep in mind that its figures are massively skewed compared to a non-dev player build. The only 100% reliable way to micro-profile your code, especially heavy C# code is to implement your own profiling instrumentation with
    Stopwatch


    I already see way too often people coming to very questionable conclusions due to misinterpretation of the single-frame results of the profiler, increasing perceived accuracy by adding another decimal place would be a bad idea IMO.
     
    Last edited: Jan 29, 2023
    alexeyzakharov and halley like this.
  4. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Thanks. Btw just let u know actually at profiler switch to timeline view it's in 3 decimal places. I think it's even better if official can add an option to switch to microsecond unit and millisecond unit back and forth.
     
  5. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,455
    Yes, I meant that there is currently no option in a menu somewhere that you were missing for a switch in precision of the data shown, outside of the Profile Analyzer.
     
    optimise likes this.