Search Unity

Logging performance results

Discussion in 'Testing & Automation' started by crowejohn20, Aug 10, 2021.

  1. crowejohn20

    crowejohn20

    Joined:
    Oct 5, 2012
    Posts:
    11
    Hey Folks,

    Following the docs and the Unite talk by Richard Fine, I've started to use the Unity Test Tools to create builds that have UTF tests in them. As someone who builds for a lot of devices, this is working great and is super handy, so thanks a lot!

    I now want to log performance data and had been using the Performance Test Framework but I find the documentation a little vague. I then came across the profiler recorder which looks great and is very simple to use.

    I'm now confused as to what I should be using within the UFT to gather data on things like framerate and draw calls.

    I was wonder what other folks use and how they implement it.

    Cheers.
     
  2. crowejohn20

    crowejohn20

    Joined:
    Oct 5, 2012
    Posts:
    11
    I see that the performance framework has issues with Switch. It runs the tests but times out returning no results. from the forums,

    "I'm going to forward this test project and issue to the Unity team and see what they say" -June 2019"

    Might be the connection to the Editor timing out? I can turn that off with playerOptions. I'll test this soon but can anyone add more calrification?

    Cheers
     
    Last edited: Aug 10, 2021
  3. jamesmo_unity

    jamesmo_unity

    Unity Technologies

    Joined:
    May 9, 2019
    Posts:
    2
    "It runs the tests but times out returning no results" - I suspect a timeout connecting to the Editor would be down to a hardware setup issue, I would ensure that all network connections are correctly setup. If you need more help with that the Nintendo Developer Portal is probably a better place to ask.
     
    MartinTilo likes this.
  4. vickycl

    vickycl

    Unity Technologies

    Joined:
    Aug 23, 2018
    Posts:
    9
    Hi John!

    Re: "I'm now confused as to what I should be using within the UFT to gather data on things like framerate and draw calls."

    There are various Performance Testing Extension measurement APIs that allow collection of different data types. For frame times, there is Measure.Frames(), which can also be given additional .ProfilerMarkers to record during the frame measurements. For profiler markers there is alternatively Measure.ProfilerMarkers(). As for Draw Calls, I would suggest that requires a Measure.Custom(), and in the scope of that use a ProfilerRecorder to record the Profiler Counter values for Draw Calls and pass that as the data point. For a list of built-in Profiler markers and counters available, see the User Manual documentation on Profiler Markers, Rendering Profiler module, and Virtual Texturing Profiler module. The 'Draw Calls Count' counter is shown on the Rendering Profiler Module page.

    Hope this helps :)
     
    Last edited: Aug 10, 2021
    crowejohn20 and MartinTilo like this.
  5. crowejohn20

    crowejohn20

    Joined:
    Oct 5, 2012
    Posts:
    11
    Hey Vicky! How's it going, been a while. Thanks for the reply, that info helped clarify a few things for me.
     
    vickycl likes this.
  6. crowejohn20

    crowejohn20

    Joined:
    Oct 5, 2012
    Posts:
    11
    Hey Jamesmo, will defo check the set up, does that mean Switch is supported by the test framework. A yes or no would go a long way here. Cheers.
     
  7. jamesmo_unity

    jamesmo_unity

    Unity Technologies

    Joined:
    May 9, 2019
    Posts:
    2
    Hey John, Sorry, I completely glossed over if UTF was supported but the answer is yes. We have Play Mode tests that regularly run on Switch.
     
    crowejohn20 likes this.
  8. crowejohn20

    crowejohn20

    Joined:
    Oct 5, 2012
    Posts:
    11
    Thanks James,

    Super helpful to get that clarification.

    All the best!
     
    jamesmo_unity likes this.