Searched refs:multiplySafe (Results 1 – 2 of 2) sorted by relevance
/frameworks/base/tests/net/java/com/android/server/net/ |
D | NetworkStatsCollectionTest.java | 30 import static com.android.server.net.NetworkStatsCollection.multiplySafe; 509 assertEquals(25, multiplySafe(50, 1, 2)); in testMultiplySafe() 510 assertEquals(100, multiplySafe(50, 2, 1)); in testMultiplySafe() 512 assertEquals(-10, multiplySafe(30, -1, 3)); in testMultiplySafe() 513 assertEquals(0, multiplySafe(30, 0, 3)); in testMultiplySafe() 514 assertEquals(10, multiplySafe(30, 1, 3)); in testMultiplySafe() 515 assertEquals(20, multiplySafe(30, 2, 3)); in testMultiplySafe() 516 assertEquals(30, multiplySafe(30, 3, 3)); in testMultiplySafe() 517 assertEquals(40, multiplySafe(30, 4, 3)); in testMultiplySafe() 520 multiplySafe(300_000_000_000L, 10_000_000_000L, 30_000_000_000L)); in testMultiplySafe() [all …]
|
/frameworks/base/services/core/java/com/android/server/net/ |
D | NetworkStatsCollection.java | 195 public static long multiplySafe(long value, long num, long den) { in multiplySafe() method in NetworkStatsCollection 317 final long targetRxBytes = multiplySafe(targetBytes, rawRxBytes, rawBytes); in getHistory() 318 final long targetTxBytes = multiplySafe(targetBytes, rawTxBytes, rawBytes); in getHistory() 326 entry.rxBytes = multiplySafe(targetRxBytes, entry.rxBytes, rawRxBytes); in getHistory() 327 entry.txBytes = multiplySafe(targetTxBytes, entry.txBytes, rawTxBytes); in getHistory()
|