/cts/tests/sensor/src/android/hardware/cts/helpers/sensorverification/ |
D | MeanVerificationTest.java | 49 SensorStats stats = new SensorStats(); in testVerify() local 52 verification.verify(stats); in testVerify() 53 verifyStats(stats, true, MEANS); in testVerify() 58 stats = new SensorStats(); in testVerify() 60 verification.verify(stats); in testVerify() 61 verifyStats(stats, true, MEANS); in testVerify() 64 stats = new SensorStats(); in testVerify() 67 verification.verify(stats); in testVerify() 72 verifyStats(stats, false, MEANS); in testVerify() 75 stats = new SensorStats(); in testVerify() [all …]
|
D | EventOrderingVerificationTest.java | 37 SensorStats stats = new SensorStats(); in testNoEvents() local 39 verification.verify(stats); in testNoEvents() 40 verifyStats(stats, true, 0); in testNoEvents() 47 SensorStats stats = new SensorStats(); in testSequentialTimestamp() local 49 verification.verify(stats); in testSequentialTimestamp() 50 verifyStats(stats, true, 0); in testSequentialTimestamp() 57 SensorStats stats = new SensorStats(); in testSingleOutofOrder() local 60 verification.verify(stats); in testSingleOutofOrder() 65 verifyStats(stats, false, 1); in testSingleOutofOrder() 66 List<Integer> indices = getIndices(stats); in testSingleOutofOrder() [all …]
|
D | FrequencyVerificationTest.java | 39 SensorStats stats = new SensorStats(); in testVerifification() local 41 verification.verify(getEnvironment(1000), stats); in testVerifification() 42 verifyStats(stats, true, 1000.0); in testVerifification() 44 stats = new SensorStats(); in testVerifification() 46 verification.verify(getEnvironment(950), stats); in testVerifification() 47 verifyStats(stats, true, 1000.0); in testVerifification() 49 stats = new SensorStats(); in testVerifification() 51 verification.verify(getEnvironment(1050), stats); in testVerifification() 52 verifyStats(stats, true, 1000.0); in testVerifification() 54 stats = new SensorStats(); in testVerifification() [all …]
|
D | EventBasicVerificationTest.java | 49 SensorStats stats; in testVerify() local 55 stats = new SensorStats(); in testVerify() 57 verification.verify(stats); in testVerify() 58 assertEquals(true, stats.getValue(EventBasicVerification.PASSED_KEY)); in testVerify() 59 assertEquals(20, (long) stats.getValue(SensorStats.EVENT_COUNT_KEY)); in testVerify() 60 assertEquals(false, stats.getValue(SensorStats.WRONG_SENSOR_KEY)); in testVerify() 64 stats = new SensorStats(); in testVerify() 67 verification.verify(stats); in testVerify() 72 assertEquals(false, stats.getValue(EventBasicVerification.PASSED_KEY)); in testVerify() 73 assertEquals(5, (long) stats.getValue(SensorStats.EVENT_COUNT_KEY)); in testVerify() [all …]
|
D | JitterVerificationTest.java | 50 SensorStats stats = new SensorStats(); in testVerify() local 52 verification.verify(environment, stats); in testVerify() 53 verifyStats(stats, true, 0.0); in testVerify() 61 stats = new SensorStats(); in testVerify() 64 verification.verify(environment, stats); in testVerify() 69 verifyStats(stats, false, 25); // 500 us range (250 us in single-sided sense) in testVerify() 116 private void verifyStats(SensorStats stats, boolean passed, double percentageJitter) { in verifyStats() argument 117 assertEquals(passed, stats.getValue(JitterVerification.PASSED_KEY)); in verifyStats() 120 (Double) stats.getValue(SensorStats.JITTER_95_PERCENTILE_PERCENT_KEY), in verifyStats()
|
D | EventGapVerificationTest.java | 70 SensorStats stats = new SensorStats(); in runVerification() local 74 verification.verify(environment, stats); in runVerification() 78 verification.verify(environment, stats); in runVerification() 85 assertEquals(pass, stats.getValue(EventGapVerification.PASSED_KEY)); in runVerification() 86 assertEquals(indices.length, stats.getValue(SensorStats.EVENT_GAP_COUNT_KEY)); in runVerification() 87 assertNotNull(stats.getValue(SensorStats.EVENT_GAP_POSITIONS_KEY)); in runVerification() 88 int[] actualIndices = (int[]) stats.getValue(SensorStats.EVENT_GAP_POSITIONS_KEY); in runVerification()
|
D | TimestampClockSourceVerificationTest.java | 166 SensorStats stats = new SensorStats(); in runVerification() local 170 verification.verify(environment, stats); in runVerification() 174 verification.verify(environment, stats); in runVerification() 182 assertEquals(pass, stats.getValue(TimestampClockSourceVerification.PASSED_KEY)); in runVerification() 183 … assertEquals(indices.length, stats.getValue(SensorStats.EVENT_TIME_WRONG_CLOCKSOURCE_COUNT_KEY)); in runVerification() 184 if (0 != (Integer) stats.getValue(SensorStats.EVENT_TIME_WRONG_CLOCKSOURCE_COUNT_KEY)) { in runVerification() 185 assertNotNull(stats.getValue(SensorStats.EVENT_TIME_WRONG_CLOCKSOURCE_POSITIONS_KEY)); in runVerification() 188 …int[] actualIndices = (int[]) stats.getValue(SensorStats.EVENT_TIME_WRONG_CLOCKSOURCE_POSITIONS_KE… in runVerification()
|
D | MagnitudeVerificationTest.java | 53 SensorStats stats = new SensorStats(); in runStats() local 56 verification.verify(stats); in runStats() 59 verification.verify(stats); in runStats() 65 assertEquals(pass, stats.getValue(MagnitudeVerification.PASSED_KEY)); in runStats() 66 assertEquals(magnitude, (Float) stats.getValue(SensorStats.MAGNITUDE_KEY), 0.01); in runStats()
|
D | InitialValueVerificationTest.java | 94 SensorStats stats = new SensorStats(); in verifyStatsWithTwoWindows() local 99 verification.verify(stats); in verifyStatsWithTwoWindows() 104 verifyStats(stats, pass, initialValues, laterValues); in verifyStatsWithTwoWindows() 115 private static void verifyStats(SensorStats stats, boolean passed, float[] initialMeans, in verifyStats() argument 117 assertEquals(passed, stats.getValue(InitialValueVerification.PASSED_KEY)); in verifyStats() 118 float[] actualInitialMeans = (float[]) stats.getValue(SensorStats.INITIAL_MEAN_KEY); in verifyStats() 119 float[] actualLaterMeans = (float[]) stats.getValue(SensorStats.LATER_MEAN_KEY); in verifyStats()
|
D | MagnitudeVerification.java | 85 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument 86 verify(stats); in verify() 92 void verify(SensorStats stats) { in verify() argument 94 stats.addValue(PASSED_KEY, true); in verify() 101 stats.addValue(PASSED_KEY, !failed); in verify() 102 stats.addValue(SensorStats.MAGNITUDE_KEY, mean); in verify()
|
D | EventOrderingVerification.java | 65 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument 66 verify(stats); in verify() 72 void verify(SensorStats stats) { in verify() argument 74 stats.addValue(PASSED_KEY, count == 0); in verify() 75 stats.addValue(SensorStats.EVENT_OUT_OF_ORDER_COUNT_KEY, count); in verify() 76 stats.addValue( in verify()
|
D | EventBasicVerification.java | 166 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument 167 verify(stats); in verify() 171 void verify(SensorStats stats) { in verify() argument 173 stats.addValue(SensorStats.EVENT_COUNT_KEY, mNumEvent); in verify() 174 stats.addValue(SensorStats.EVENT_COUNT_EXPECTED_KEY, mExpectedMinNumEvent); in verify() 175 stats.addValue(SensorStats.WRONG_SENSOR_KEY, mWrongSensorObserved); in verify() 181 stats.addValue(PASSED_KEY, success); in verify()
|
D | StandardDeviationVerificationTest.java | 64 SensorStats stats = new SensorStats(); in runVerification() local 67 verification.verify(stats); in runVerification() 71 verification.verify(stats); in runVerification() 78 assertEquals(pass, stats.getValue(StandardDeviationVerification.PASSED_KEY)); in runVerification() 79 float[] actual = (float[]) stats.getValue(SensorStats.STANDARD_DEVIATION_KEY); in runVerification()
|
D | OffsetVerificationTest.java | 98 SensorStats stats = new SensorStats(); in runStats() local 101 verification.verify(stats); in runStats() 104 verification.verify(stats); in runStats() 110 assertEquals(pass, stats.getValue(OffsetVerification.PASSED_KEY)); in runStats()
|
D | EventGapVerification.java | 68 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument 71 stats.addValue(PASSED_KEY, "skipped (under load)"); in verify() 81 stats.addValue(PASSED_KEY, pass); in verify() 82 stats.addValue(SensorStats.EVENT_GAP_COUNT_KEY, count); in verify() 83 stats.addValue(SensorStats.EVENT_GAP_POSITIONS_KEY, getIndexArray(mEventGaps)); in verify()
|
D | MeanVerification.java | 96 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument 97 verify(stats); in verify() 103 void verify(SensorStats stats) { in verify() argument 105 stats.addValue(PASSED_KEY, true); in verify() 121 stats.addValue(PASSED_KEY, !failed); in verify() 122 stats.addValue(SensorStats.MEAN_KEY, means); in verify()
|
D | OffsetVerification.java | 78 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument 79 verify(stats); in verify() 85 protected void verify(SensorStats stats) { in verify() argument 90 stats.addValue(PASSED_KEY, pass); in verify()
|
/cts/hostsidetests/statsd/src/android/cts/statsd/metadata/ |
D | MetadataTests.java | 61 for (ConfigStats stats: report.getConfigStatsList()) { in testConfigTtl() 62 if (stats.getId() == CONFIG_ID && stats.getUid() == getHostUid()) { in testConfigTtl() 63 if(!stats.hasDeletionTimeSec()) { in testConfigTtl() 66 creationTime = stats.getCreationTimeSec(); in testConfigTtl() 80 for (ConfigStats stats: report.getConfigStatsList()) { in testConfigTtl() 81 if (stats.getId() == CONFIG_ID && stats.getUid() == getHostUid()) { in testConfigTtl() 83 if (stats.getCreationTimeSec() == creationTime) { in testConfigTtl() 85 stats.hasDeletionTimeSec()); in testConfigTtl() 88 Math.abs(stats.getDeletionTimeSec() - expectedTime) <= 2); in testConfigTtl() 91 if(!stats.hasDeletionTimeSec()) { in testConfigTtl() [all …]
|
/cts/tests/tests/content/src/android/content/pm/cts/ |
D | PackageStatsTest.java | 36 PackageStats stats = new PackageStats(PACKAGE_NAME); in testPackageStats() local 37 assertEquals(PACKAGE_NAME, stats.packageName); in testPackageStats() 38 stats.cacheSize = codeSize; in testPackageStats() 39 stats.codeSize = cacheSize; in testPackageStats() 40 stats.dataSize = dataSize; in testPackageStats() 41 PackageStats infoFromExisted = new PackageStats(stats); in testPackageStats() 42 checkInfoSame(stats, infoFromExisted); in testPackageStats() 45 assertNotNull(stats.toString()); in testPackageStats() 46 assertEquals(0, stats.describeContents()); in testPackageStats() 50 stats.writeToParcel(p, 0); in testPackageStats() [all …]
|
/cts/tests/sensor/src/android/hardware/cts/helpers/ |
D | SensorStatsTest.java | 32 SensorStats stats = new SensorStats(); in testFlatten() local 33 stats.addValue("value0", 0); in testFlatten() 34 stats.addValue("value1", 1); in testFlatten() 45 stats.addSensorStats("stats0", subStats); in testFlatten() 48 stats.addSensorStats("stats2", new SensorStats()); in testFlatten() 51 stats.addSensorStats("stats3", null); in testFlatten() 52 stats.addValue("value6", null); in testFlatten() 54 Map<String, Object> flattened = stats.flatten(); in testFlatten()
|
/cts/tests/tests/uiautomation/src/android/app/uiautomation/cts/ |
D | UiAutomationTest.java | 222 WindowContentFrameStats stats = uiAutomation.getWindowContentFrameStats(windowId); in testWindowContentFrameStats() local 227 assertNotNull(stats); in testWindowContentFrameStats() 230 assertTrue(stats.getRefreshPeriodNano() > 0); in testWindowContentFrameStats() 233 final int frameCount = stats.getFrameCount(); in testWindowContentFrameStats() 237 assertWindowContentTimestampsInAscendingOrder(stats); in testWindowContentFrameStats() 240 assertEquals(stats.getStartTimeNano(), stats.getFramePresentedTimeNano(0)); in testWindowContentFrameStats() 241 assertEquals(stats.getEndTimeNano(), stats.getFramePresentedTimeNano(frameCount - 1)); in testWindowContentFrameStats() 277 WindowContentFrameStats stats = uiAutomation.getWindowContentFrameStats(windowId); in testWindowContentFrameStatsNoAnimation() local 282 assertNotNull(stats); in testWindowContentFrameStatsNoAnimation() 285 assertTrue(stats.getRefreshPeriodNano() > 0); in testWindowContentFrameStatsNoAnimation() [all …]
|
/cts/hostsidetests/appsecurity/test-apps/StorageStatsApp/src/com/android/cts/storagestatsapp/ |
D | StorageStatsTest.java | 83 final StorageStatsManager stats = getContext() in testVerify() local 89 stats.isQuotaSupported(UUID_DEFAULT)); in testVerify() 92 stats.isReservedSupported(UUID_DEFAULT)); in testVerify() 97 final StorageStatsManager stats = getContext().getSystemService(StorageStatsManager.class); in testVerifySummary() local 99 final long actualTotal = stats.getTotalBytes(UUID_DEFAULT); in testVerifySummary() 103 final long actualFree = stats.getFreeBytes(UUID_DEFAULT); in testVerifySummary() 109 final StorageStatsManager stats = getContext().getSystemService(StorageStatsManager.class); in testVerifyStats() local 113 final StorageStats beforeApp = stats.queryStatsForUid(UUID_DEFAULT, uid); in testVerifyStats() 114 final StorageStats beforeUser = stats.queryStatsForUser(UUID_DEFAULT, user); in testVerifyStats() 118 final StorageStats afterApp = stats.queryStatsForUid(UUID_DEFAULT, uid); in testVerifyStats() [all …]
|
/cts/tests/sensor/src/android/hardware/cts/helpers/sensoroperations/ |
D | SensorOperation.java | 46 protected SensorOperation(SensorStats stats) { in SensorOperation() argument 47 mStats = stats; in SensorOperation() 78 protected void addSensorStats(String key, SensorStats stats) { in addSensorStats() argument 79 getStats().addSensorStats(key, stats); in addSensorStats() 88 protected void addSensorStats(String key, int index, SensorStats stats) { in addSensorStats() argument 89 addSensorStats(String.format("%s_%03d", key, index), stats); in addSensorStats()
|
/cts/tests/tests/media/libmediandkjni/ |
D | native_media_utils.cpp | 143 Status Validator::checkOverallBitrate(const Stats &stats, const RunConfig& config) { in checkOverallBitrate() argument 160 int32_t avgBitrate = stats.getBitrateAverage(0, config.frameCount() - 1); in checkOverallBitrate() 181 Status Validator::checkIntraPeriod(const Stats& stats, const RunConfig& config) { in checkIntraPeriod() argument 206 if (iInterval >= stats.frameCount()) { in checkIntraPeriod() 208 iInterval, stats.frameCount()); in checkIntraPeriod() 214 int32_t lastKeyLocation = stats.getSyncFrameNext(0); in checkIntraPeriod() 216 …int32_t nextKeyLocation = stats.getSyncFrameNext(lastKeyLocation + iInterval - kSyncFrameDeviation… in checkIntraPeriod() 239 Status Validator::checkDynamicKeyFrames(const Stats& stats, const RunConfig& config) { in checkDynamicKeyFrames() argument 250 int32_t generatedKeyLocation = stats.getSyncFrameNext(d->frameNum()); in checkDynamicKeyFrames() 266 Status Validator::checkDynamicBitrate(const Stats& stats, const RunConfig& config) { in checkDynamicBitrate() argument [all …]
|
D | codec-utils-jni.cpp | 445 bool Raw2YUVStats(jlong rawStats[10], jfloat stats[9]) { in Raw2YUVStats() 457 stats[0] = sum_x[0] / (float)num; // y average in Raw2YUVStats() 458 stats[1] = sum_x[1] / (float)num; // u average in Raw2YUVStats() 459 stats[2] = sum_x[2] / (float)num; // v average in Raw2YUVStats() 463 stats[3] = sqrtf((sum_xx[0] + 1) * num - sum_x[0] * sum_x[0]) / num; // y stdev in Raw2YUVStats() 464 stats[4] = sqrtf((sum_xx[1] + 1) * num - sum_x[1] * sum_x[1]) / num; // u stdev in Raw2YUVStats() 465 stats[5] = sqrtf((sum_xx[2] + 1) * num - sum_x[2] * sum_x[2]) / num; // v stdev in Raw2YUVStats() 468 stats[6] = (float)(sum_xy[0] + 1 - sum_x[0] * sum_x[1] / num) / num / stats[3] / stats[4]; in Raw2YUVStats() 470 stats[7] = (float)(sum_xy[1] + 1 - sum_x[0] * sum_x[2] / num) / num / stats[3] / stats[5]; in Raw2YUVStats() 472 stats[8] = (float)(sum_xy[2] + 1 - sum_x[1] * sum_x[2] / num) / num / stats[4] / stats[5]; in Raw2YUVStats() [all …]
|