Home
last modified time | relevance | path

Searched refs:stats (Results 1 – 25 of 89) sorted by relevance

1234

/cts/tests/app/src/android/app/cts/
DNotificationStatsTest.java51 NotificationStats stats = new NotificationStats(); in testConstructor() local
53 assertFalse(stats.hasSeen()); in testConstructor()
54 assertFalse(stats.hasDirectReplied()); in testConstructor()
55 assertFalse(stats.hasExpanded()); in testConstructor()
56 assertFalse(stats.hasInteracted()); in testConstructor()
57 assertFalse(stats.hasViewedSettings()); in testConstructor()
58 assertFalse(stats.hasSnoozed()); in testConstructor()
59 assertEquals(NotificationStats.DISMISSAL_NOT_DISMISSED, stats.getDismissalSurface()); in testConstructor()
60 assertEquals(NotificationStats.DISMISS_SENTIMENT_UNKNOWN, stats.getDismissalSentiment()); in testConstructor()
64 NotificationStats stats = new NotificationStats(); in testSeen() local
[all …]
/cts/tests/sensor/src/android/hardware/cts/helpers/sensorverification/
DMeanVerificationTest.java49 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 …]
DEventOrderingVerificationTest.java37 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 …]
DFrequencyVerificationTest.java39 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 …]
DEventBasicVerificationTest.java49 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 …]
DMeanLargerThanVerificationTest.java45 SensorStats stats = new SensorStats(); in testVerify() local
47 verification.verify(stats); in testVerify()
48 verifyStats(stats, true, MEANS); in testVerify()
53 stats = new SensorStats(); in testVerify()
55 verification.verify(stats); in testVerify()
56 verifyStats(stats, true, MEANS); in testVerify()
61 stats = new SensorStats(); in testVerify()
63 verification.verify(stats); in testVerify()
64 verifyStats(stats, true, MEANS); in testVerify()
68 stats = new SensorStats(); in testVerify()
[all …]
DJitterVerificationTest.java50 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()
DEventGapVerificationTest.java70 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()
DMagnitudeVerificationTest.java53 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()
DTimestampClockSourceVerificationTest.java166 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()
DInitialValueVerificationTest.java94 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()
DEventOrderingVerification.java65 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()
DMagnitudeVerification.java85 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()
DMeanLargerThanVerification.java86 public void verify(TestSensorEnvironment environment, SensorStats stats) { in verify() argument
87 verify(stats); in verify()
91 void verify(SensorStats stats) { in verify() argument
93 stats.addValue(PASSED_KEY, true); in verify()
106 stats.addValue(PASSED_KEY, !failed); in verify()
107 stats.addValue(SensorStats.MEAN_KEY, means); in verify()
DEventBasicVerification.java166 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()
DStandardDeviationVerificationTest.java64 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()
DEventGapVerification.java68 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()
/cts/tests/tests/content/src/android/content/pm/cts/
DPackageStatsTest.java36 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/
DSensorStatsTest.java32 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/hostsidetests/statsdatom/src/android/cts/statsdatom/binderstats/
DLooperStatsTests.java81 AtomsProto.LooperStats stats = atom.getLooperStats(); in testLooperStats() local
85 stats.getHandlerClassName().equals( in testLooperStats()
88 stats.getMessageName().equals( in testLooperStats()
92 assertThat(stats.getMessageCount()).isGreaterThan(0L); in testLooperStats()
93 assertThat(stats.getRecordedMessageCount()).isGreaterThan(0L); in testLooperStats()
94 assertThat(stats.getRecordedTotalLatencyMicros()) in testLooperStats()
96 assertThat(stats.getRecordedTotalCpuMicros()).isIn(Range.open(0L, 1000000L)); in testLooperStats()
97 assertThat(stats.getRecordedMaxLatencyMicros()).isIn(Range.open(0L, 1000000L)); in testLooperStats()
98 assertThat(stats.getRecordedMaxCpuMicros()).isIn(Range.open(0L, 1000000L)); in testLooperStats()
99 assertThat(stats.getRecordedDelayMessageCount()).isGreaterThan(0L); in testLooperStats()
[all …]
/cts/tests/tests/uiautomation/src/android/app/uiautomation/cts/
DUiAutomationTest.java206 WindowContentFrameStats stats = uiAutomation.getWindowContentFrameStats(windowId); in testWindowContentFrameStats() local
211 assertNotNull(stats); in testWindowContentFrameStats()
214 assertTrue(stats.getRefreshPeriodNano() > 0); in testWindowContentFrameStats()
217 final int frameCount = stats.getFrameCount(); in testWindowContentFrameStats()
221 assertWindowContentTimestampsInAscendingOrder(stats); in testWindowContentFrameStats()
224 assertEquals(stats.getStartTimeNano(), stats.getFramePresentedTimeNano(0)); in testWindowContentFrameStats()
225 assertEquals(stats.getEndTimeNano(), stats.getFramePresentedTimeNano(frameCount - 1)); in testWindowContentFrameStats()
261 WindowContentFrameStats stats = uiAutomation.getWindowContentFrameStats(windowId); in testWindowContentFrameStatsNoAnimation() local
266 assertNotNull(stats); in testWindowContentFrameStatsNoAnimation()
269 assertTrue(stats.getRefreshPeriodNano() > 0); in testWindowContentFrameStatsNoAnimation()
[all …]
/cts/tests/sensor/src/android/hardware/cts/helpers/sensoroperations/
DSensorOperation.java46 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/hostsidetests/appsecurity/test-apps/StorageStatsApp/src/com/android/cts/storagestatsapp/
DStorageStatsTest.java85 final StorageStatsManager stats = getContext() in testVerify() local
91 stats.isQuotaSupported(UUID_DEFAULT)); in testVerify()
94 stats.isReservedSupported(UUID_DEFAULT)); in testVerify()
99 final StorageStatsManager stats = getContext().getSystemService(StorageStatsManager.class); in testVerifySummary() local
101 final long actualTotal = stats.getTotalBytes(UUID_DEFAULT); in testVerifySummary()
105 final long actualFree = stats.getFreeBytes(UUID_DEFAULT); in testVerifySummary()
111 final StorageStatsManager stats = getContext().getSystemService(StorageStatsManager.class); in testVerifyStats() local
115 final StorageStats beforeApp = stats.queryStatsForUid(UUID_DEFAULT, uid); in testVerifyStats()
116 final StorageStats beforeUser = stats.queryStatsForUser(UUID_DEFAULT, user); in testVerifyStats()
120 final StorageStats afterApp = stats.queryStatsForUid(UUID_DEFAULT, uid); in testVerifyStats()
[all …]
/cts/hostsidetests/statsdatom/src/android/cts/statsdatom/memory/
DProcessDmabufMemoryTests.java67 AtomsProto.ProcessDmabufMemory stats = atom.getProcessDmabufMemory(); in testProcessDmabufMemoryAtom() local
68 assertThat(stats.getProcessName()).isNotEmpty(); in testProcessDmabufMemoryAtom()
69 assertThat(stats.getMappedDmabufKb()).isAtLeast(0); in testProcessDmabufMemoryAtom()
70 assertThat(stats.getMappedDmabufCount()).isAtLeast(0); in testProcessDmabufMemoryAtom()
72 assertThat(stats.getRetainedDmabufKb()).isAtLeast(0); in testProcessDmabufMemoryAtom()
73 assertThat(stats.getRetainedDmabufCount()).isAtLeast(0); in testProcessDmabufMemoryAtom()
/cts/tests/tests/media/libmediandkjni/
Dcodec-utils-jni.cpp445 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 …]

1234