Home
last modified time | relevance | path

Searched refs:cpuTimes (Results 1 – 4 of 4) sorted by relevance

/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DKernelSingleUidTimeReaderTest.java121 long[] cpuTimes = new long[TEST_FREQ_COUNT - 1]; in readDelta_incorrectCount() local
122 for (int i = 0; i < cpuTimes.length; ++i) { in readDelta_incorrectCount()
123 cpuTimes[i] = 111 + i; in readDelta_incorrectCount()
125 mInjector.setData(cpuTimes); in readDelta_incorrectCount()
132 cpuTimes = new long[TEST_FREQ_COUNT + 1]; in readDelta_incorrectCount()
133 for (int i = 0; i < cpuTimes.length; ++i) { in readDelta_incorrectCount()
134 cpuTimes[i] = 222 + i; in readDelta_incorrectCount()
136 mInjector.setData(cpuTimes); in readDelta_incorrectCount()
286 public void setData(long[] cpuTimes) { in setData() argument
287 final ByteBuffer buffer = ByteBuffer.allocate(cpuTimes.length * Long.BYTES); in setData()
[all …]
DBstatsCpuTimesValidationTest.java623 private void assertCpuTimesValid(long[] cpuTimes) { in assertCpuTimesValid() argument
624 assertNotNull(cpuTimes); in assertCpuTimesValid()
625 for (int i = 0; i < cpuTimes.length; ++i) { in assertCpuTimesValid()
626 if (cpuTimes[i] < 0) { in assertCpuTimesValid()
627 fail("Malformed cpu times data (-ve values): " + Arrays.toString(cpuTimes)); in assertCpuTimesValid()
630 final int numFreqs = cpuTimes.length / 2; in assertCpuTimesValid()
632 if (cpuTimes[i] < cpuTimes[numFreqs + i]) { in assertCpuTimesValid()
633 fail("Malformed cpu times data (screen-off > total)" + Arrays.toString(cpuTimes)); in assertCpuTimesValid()
843 private static String getMsgCpuTimesSum(long[] cpuTimes) throws Exception { in getMsgCpuTimesSum() argument
844 if (cpuTimes == null) { in getMsgCpuTimesSum()
[all …]
DBatteryStatsImplTest.java84 final long[][] cpuTimes = { in testUpdateProcStateCpuTimes() local
91 when(mKernelSingleUidTimeReader.readDeltaMs(testUids[i])).thenReturn(cpuTimes[i]); in testUpdateProcStateCpuTimes()
108 assertArrayEquals("Uid=" + testUids[i], cpuTimes[i], in testUpdateProcStateCpuTimes()
135 long[] expectedCpuTimes = cpuTimes[i].clone(); in testUpdateProcStateCpuTimes()
167 long[] expectedCpuTimes = cpuTimes[i].clone(); in testUpdateProcStateCpuTimes()
206 long[] expectedCpuTimes = cpuTimes[i].clone(); in testUpdateProcStateCpuTimes()
/frameworks/base/core/java/android/os/
DBatteryStats.java5893 final long[] cpuTimes = u.getCpuFreqTimes(which, procState); in dumpLocked() local
5894 if (cpuTimes != null) { in dumpLocked()
5898 for (int i = 0; i < cpuTimes.length; ++i) { in dumpLocked()
5899 sb.append(" " + cpuTimes[i]); in dumpLocked()