commit | e6b3018509d2da9d4180bebdba934f9d14a9660f | [log] [tgz] |
---|---|---|
author | Pierre-Clément Tosi <ptosi@google.com> | Wed Apr 19 18:00:41 2023 +0100 |
committer | Pierre-Clément Tosi <ptosi@google.com> | Wed Apr 19 18:10:27 2023 +0100 |
tree | cb5419ceb39875d6a289cf677b040bff68f2c8b4 | |
parent | bfa0d4c4a90a61961a73d492d9a1f8d9704e5906 [diff] |
test: Use INFINITY & NaN for intermediate metrics As MIN_VALUE is the smallest positive value IEEE 754 allows, computeStats() returns an incorrect maximum value when it receives a set of metrics that are all 0 so replace MIN_VALUE with NEGATIVE_INFINITY. For consistency and clarity, use the corresponding POSITIVE_INFINITY and NaN to respectively initialize the minimum value and median value; as the function assumes that it received at least one item by dividing by (values.size() - 1), these values should never be returned by the function. Test: atest MicrodroidBenchmarks#testMicrodroidDebugBootTime Change-Id: I9368a7d3de59d20f7b55b03520e07d2509ab13b7
This repository contains userspace services related to running virtual machines on Android, especially protected virtual machines. See the getting started documentation and Microdroid README for more information.