Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f69fc9c4 authored by Sudheer Shanka's avatar Sudheer Shanka
Browse files

Don't change the order of test results.

Test: atest apct-tests/perftests/multiuser/src/android/multiuser/UserLifecycleTests.java
Change-Id: Ie21030581ae81509eaa5b3ec31d5e6978dcb23d4
parent 0671c44a
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -60,11 +60,13 @@ public class BenchmarkResults {
        if (size == 0) {
            return 0f;
        }
        Collections.sort(mResults);

        final ArrayList<Long> resultsCopy = new ArrayList<>(mResults);
        Collections.sort(resultsCopy);
        final int idx = size / 2;
        return size % 2 == 0
                ? (double) (mResults.get(idx) + mResults.get(idx - 1)) / 2
                : mResults.get(idx);
                ? (double) (resultsCopy.get(idx) + resultsCopy.get(idx - 1)) / 2
                : resultsCopy.get(idx);
    }

    private double standardDeviation() {