commit | d1add7c6094f1b577a91e1d2c933e9281d37f87c | [log] [tgz] |
---|---|---|
author | Pavan Kumar M <rpavan@codeaurora.org> | Mon May 24 00:28:41 2021 +0530 |
committer | Pavan Kumar M <rpavan@codeaurora.org> | Mon Jun 21 08:41:27 2021 +0000 |
tree | dbb116cc197cc46434e36a65c33f6831322880ec | |
parent | cce76a7977a7437fea418905328a6f0a753c0c7c [diff] |
Gracefully handle integer overflows. Avoid recording negative data by doing integer-based math as much as possible, but switch to double-based math if we detect that we'd end up causing an overflow. Test: - Builds, Boots - High data throughput scenarios - NetworkStatsHistoryTest, NetworkStatsCollectionTest, NetworkStatsTest. Bug: 119527458 CRs-Fixed: 2933277 Change-Id: I355fc9bd127da83c1dc70ab3b1261346d4fa5de0