Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug SampleGroups SampleUnit is not obeyed

Discussion in 'Testing & Automation' started by daschatten, Jan 31, 2020.

  1. daschatten

    daschatten

    Joined:
    Jul 16, 2015
    Posts:
    208
    If i add a new SampleGroup like this:

    Code (CSharp):
    1. new SampleGroup("Duration", SampleUnit.Microsecond, false);
    and put tests in it with

    Code (CSharp):
    1. .SampleGroup("Duration")
    The Test Window displays the tests in the new SampleGroup but the SampleUnit is not obeyed. Some are showing microseconds, others milliseconds.
     
  2. gintautass

    gintautass

    QA Minion Unity Technologies

    Joined:
    Oct 27, 2015
    Posts:
    46
    Hey,

    In one of the recent releases we made it automatically adjust when displaying results.
    In a lot of cases we had tests that had low level units that were unreadable to view.

    So let's say your test takes 1,000,000ns
    We will then shift the sample unit and display 1ms when printing it out
     
  3. daschatten

    daschatten

    Joined:
    Jul 16, 2015
    Posts:
    208
    In my case i had it explicitely set to be able to easily compare numbers in the overview. I tested various path finding grid sizes and the results differed between micro- and milliseconds. Having the same base would make the comparison easier. I suggest to obey the excplicit set unit and set it automatically when not set.