Merge "Don't change the order of test results."
This commit is contained in:
committed by
Android (Google) Code Review
commit
c7dc355feb
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user