Home
last modified time | relevance | path

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

12345678910>>...12

/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DNotificationStatsTest.java42 NotificationStats stats = new NotificationStats(); in testConstructor() local
44 assertFalse(stats.hasSeen()); in testConstructor()
45 assertFalse(stats.hasDirectReplied()); in testConstructor()
46 assertFalse(stats.hasExpanded()); in testConstructor()
47 assertFalse(stats.hasInteracted()); in testConstructor()
48 assertFalse(stats.hasViewedSettings()); in testConstructor()
49 assertFalse(stats.hasSnoozed()); in testConstructor()
50 assertEquals(NotificationStats.DISMISSAL_NOT_DISMISSED, stats.getDismissalSurface()); in testConstructor()
51 assertEquals(NotificationStats.DISMISS_SENTIMENT_UNKNOWN, stats.getDismissalSentiment()); in testConstructor()
56 NotificationStats stats = new NotificationStats(); in testSeen() local
[all …]
/frameworks/base/tests/net/java/android/net/
DNetworkStatsHistoryTest.java66 private NetworkStatsHistory stats; field in NetworkStatsHistoryTest
70 if (stats != null) { in tearDown()
71 assertConsistent(stats); in tearDown()
106 stats = new NetworkStatsHistory(BUCKET_SIZE); in testRecordSingleBucket()
109 stats.recordData(TEST_START, TEST_START + SECOND_IN_MILLIS, in testRecordSingleBucket()
112 assertEquals(1, stats.size()); in testRecordSingleBucket()
113 assertValues(stats, 0, SECOND_IN_MILLIS, 1024L, 10L, 2048L, 20L, 2L); in testRecordSingleBucket()
119 stats = new NetworkStatsHistory(bucketDuration); in testRecordEqualBuckets()
123 stats.recordData(recordStart, recordStart + bucketDuration, in testRecordEqualBuckets()
126 assertEquals(2, stats.size()); in testRecordEqualBuckets()
[all …]
DNetworkStatsTest.java66 final NetworkStats stats = new NetworkStats(TEST_START, 5) in testFindIndex() local
78 assertEquals(4, stats.findIndex(TEST_IFACE, 102, SET_DEFAULT, TAG_NONE, METERED_YES, in testFindIndex()
80 assertEquals(3, stats.findIndex(TEST_IFACE, 102, SET_DEFAULT, TAG_NONE, METERED_NO, in testFindIndex()
82 assertEquals(2, stats.findIndex(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_YES, in testFindIndex()
84 assertEquals(1, stats.findIndex(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, METERED_NO, in testFindIndex()
86 assertEquals(0, stats.findIndex(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, METERED_NO, in testFindIndex()
88 assertEquals(-1, stats.findIndex(TEST_IFACE, 6, SET_DEFAULT, TAG_NONE, METERED_NO, in testFindIndex()
90 assertEquals(-1, stats.findIndex(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, METERED_NO, in testFindIndex()
96 final NetworkStats stats = new NetworkStats(TEST_START, 3) in testFindIndexHinted() local
115 for (int hint = 0; hint < stats.size(); hint++) { in testFindIndexHinted()
[all …]
/frameworks/base/core/java/com/android/internal/app/procstats/
DPssTable.java57 final long[] stats = getArrayForKey(key); in mergeStats() local
63 mergeStats(stats, statsIndex, thatStats, thatStatsIndex); in mergeStats()
74 final long[] stats = getArrayForKey(key); in mergeStats() local
76 mergeStats(stats, statsIndex, inCount, minPss, avgPss, maxPss, minUss, avgUss, maxUss, in mergeStats()
80 public static void mergeStats(final long[] stats, final int statsIndex, in mergeStats() argument
82 mergeStats(stats, statsIndex, (int)thatStats[thatStatsIndex + PSS_SAMPLE_COUNT], in mergeStats()
94 public static void mergeStats(final long[] stats, final int statsIndex, final int inCount, in mergeStats() argument
98 final long count = stats[statsIndex + PSS_SAMPLE_COUNT]; in mergeStats()
100 stats[statsIndex + PSS_SAMPLE_COUNT] = inCount; in mergeStats()
101 stats[statsIndex + PSS_MINIMUM] = minPss; in mergeStats()
[all …]
/frameworks/base/tests/net/java/com/android/server/net/
DNetworkStatsFactoryTest.java91 final NetworkStats stats = parseDetailedStats(R.raw.xt_qtaguid_typical); in testNetworkStatsDetail() local
93 assertEquals(70, stats.size()); in testNetworkStatsDetail()
94 assertStatsEntry(stats, "wlan0", 0, SET_DEFAULT, 0x0, 18621L, 2898L); in testNetworkStatsDetail()
95 assertStatsEntry(stats, "wlan0", 10011, SET_DEFAULT, 0x0, 35777L, 5718L); in testNetworkStatsDetail()
96 assertStatsEntry(stats, "wlan0", 10021, SET_DEFAULT, 0x7fffff01, 562386L, 49228L); in testNetworkStatsDetail()
97 assertStatsEntry(stats, "rmnet1", 10021, SET_DEFAULT, 0x30100000, 219110L, 227423L); in testNetworkStatsDetail()
98 assertStatsEntry(stats, "rmnet2", 10001, SET_DEFAULT, 0x0, 1125899906842624L, 984L); in testNetworkStatsDetail()
118 final NetworkStats stats = parseDetailedStats(R.raw.xt_qtaguid_typical); in testNetworkStatsWithSet() local
119 assertEquals(70, stats.size()); in testNetworkStatsWithSet()
120 assertStatsEntry(stats, "rmnet1", 10021, SET_DEFAULT, 0x30100000, 219110L, 578L, 227423L, in testNetworkStatsWithSet()
[all …]
/frameworks/base/cmds/statsd/tests/guardrail/
DStatsdStats_test.cpp31 StatsdStats stats; in TEST() local
37 stats.noteConfigReceived(key, metricsCount, conditionsCount, matchersCount, alertsCount, {}, in TEST()
40 stats.dumpStats(&output, false /*reset stats*/); in TEST()
58 StatsdStats stats; in TEST() local
64 stats.noteConfigReceived(key, metricsCount, conditionsCount, matchersCount, alertsCount, {}, in TEST()
67 stats.dumpStats(&output, false); in TEST()
79 StatsdStats stats; in TEST() local
85 stats.noteConfigReceived(key, metricsCount, conditionsCount, matchersCount, alertsCount, {}, in TEST()
88 stats.dumpStats(&output, false); in TEST()
96 stats.noteConfigRemoved(key); in TEST()
[all …]
/frameworks/base/services/core/jni/
Dcom_android_server_net_NetworkStatsService.cpp57 static uint64_t getStatsType(struct Stats* stats, StatsType type) { in getStatsType() argument
60 return stats->rxBytes; in getStatsType()
62 return stats->rxPackets; in getStatsType()
64 return stats->txBytes; in getStatsType()
66 return stats->txPackets; in getStatsType()
68 return stats->tcpRxPackets; in getStatsType()
70 return stats->tcpTxPackets; in getStatsType()
76 static int parseIfaceStats(const char* iface, struct Stats* stats) { in parseIfaceStats() argument
97 stats->rxBytes += rxBytes; in parseIfaceStats()
98 stats->rxPackets += rxPackets; in parseIfaceStats()
[all …]
Dcom_android_server_net_NetworkStatsFactory.cpp207 static int statsLinesToNetworkStats(JNIEnv* env, jclass clazz, jobject stats, in statsLinesToNetworkStats() argument
211 bool grow = size > env->GetIntField(stats, gNetworkStatsClassInfo.capacity); in statsLinesToNetworkStats()
213 ScopedLocalRef<jobjectArray> iface(env, get_string_array(env, stats, in statsLinesToNetworkStats()
216 ScopedIntArrayRW uid(env, get_int_array(env, stats, in statsLinesToNetworkStats()
219 ScopedIntArrayRW set(env, get_int_array(env, stats, in statsLinesToNetworkStats()
222 ScopedIntArrayRW tag(env, get_int_array(env, stats, in statsLinesToNetworkStats()
225 ScopedIntArrayRW metered(env, get_int_array(env, stats, in statsLinesToNetworkStats()
228 ScopedIntArrayRW roaming(env, get_int_array(env, stats, in statsLinesToNetworkStats()
231 ScopedIntArrayRW defaultNetwork(env, get_int_array(env, stats, in statsLinesToNetworkStats()
234 ScopedLongArrayRW rxBytes(env, get_long_array(env, stats, in statsLinesToNetworkStats()
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/p2p/
DWifiP2pMetricsTest.java58 WifiP2pStats stats; in startAndEndConnectionEventSucceeds() local
63 stats = mWifiP2pMetrics.consolidateProto(); in startAndEndConnectionEventSucceeds()
64 assertEquals(1, stats.connectionEvent.length); in startAndEndConnectionEventSucceeds()
69 stats = mWifiP2pMetrics.consolidateProto(); in startAndEndConnectionEventSucceeds()
70 assertEquals(2, stats.connectionEvent.length); in startAndEndConnectionEventSucceeds()
75 stats = mWifiP2pMetrics.consolidateProto(); in startAndEndConnectionEventSucceeds()
76 assertEquals(3, stats.connectionEvent.length); in startAndEndConnectionEventSucceeds()
81 stats = mWifiP2pMetrics.consolidateProto(); in startAndEndConnectionEventSucceeds()
82 assertEquals(3, stats.connectionEvent.length); in startAndEndConnectionEventSucceeds()
87 stats = mWifiP2pMetrics.consolidateProto(); in startAndEndConnectionEventSucceeds()
[all …]
/frameworks/av/include/media/
DEventMetric.h88 EventStatistics* stats = values_[attribute].get(); in Record() local
90 double deviation = value - stats->mean; in Record()
91 stats->mean = stats->mean + (deviation / stats->count); in Record()
92 stats->sum_squared_deviation = in Record()
93 stats->sum_squared_deviation + (deviation * (value - stats->mean)); in Record()
94 stats->count++; in Record()
96 stats->min = stats->min < value ? stats->min : value; in Record()
97 stats->max = stats->max > value ? stats->max : value; in Record()
99 std::unique_ptr<EventStatistics> stats = in Record() local
101 stats->count = 1; in Record()
[all …]
/frameworks/av/media/libmedia/include/media/
DEventMetric.h88 EventStatistics* stats = values_[attribute].get(); in Record() local
90 double deviation = value - stats->mean; in Record()
91 stats->mean = stats->mean + (deviation / stats->count); in Record()
92 stats->sum_squared_deviation = in Record()
93 stats->sum_squared_deviation + (deviation * (value - stats->mean)); in Record()
94 stats->count++; in Record()
96 stats->min = stats->min < value ? stats->min : value; in Record()
97 stats->max = stats->max > value ? stats->max : value; in Record()
99 std::unique_ptr<EventStatistics> stats = in Record() local
101 stats->count = 1; in Record()
[all …]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/
DModemPowerMetrics.java47 CellularBatteryStats stats = getStats(); in buildProto() local
48 if (stats != null) { in buildProto()
49 m.loggingDurationMs = stats.getLoggingDurationMs(); in buildProto()
50 m.energyConsumedMah = stats.getEnergyConsumedMaMs() in buildProto()
52 m.numPacketsTx = stats.getNumPacketsTx(); in buildProto()
53 m.cellularKernelActiveTimeMs = stats.getKernelActiveTimeMs(); in buildProto()
54 if (stats.getTimeInRxSignalStrengthLevelMs() != null in buildProto()
55 && stats.getTimeInRxSignalStrengthLevelMs().length > 0) { in buildProto()
56 m.timeInVeryPoorRxSignalLevelMs = stats.getTimeInRxSignalStrengthLevelMs()[0]; in buildProto()
58 m.sleepTimeMs = stats.getSleepTimeMs(); in buildProto()
[all …]
/frameworks/base/services/robotests/backup/src/com/android/server/backup/transport/
DTransportStatsTest.java54 Stats stats = mTransportStats.getStatsForTransport(mTransportComponent1); in testRegisterConnectionTime() local
55 assertThat(stats.average).isWithin(TOLERANCE).of(50); in testRegisterConnectionTime()
56 assertThat(stats.max).isEqualTo(50L); in testRegisterConnectionTime()
57 assertThat(stats.min).isEqualTo(50L); in testRegisterConnectionTime()
58 assertThat(stats.n).isEqualTo(1); in testRegisterConnectionTime()
67 Stats stats = mTransportStats.getStatsForTransport(mTransportComponent1); in testRegisterConnectionTime_whenHasAlreadyOneSample() local
68 assertThat(stats.average).isWithin(TOLERANCE).of(75); in testRegisterConnectionTime_whenHasAlreadyOneSample()
69 assertThat(stats.max).isEqualTo(100L); in testRegisterConnectionTime_whenHasAlreadyOneSample()
70 assertThat(stats.min).isEqualTo(50L); in testRegisterConnectionTime_whenHasAlreadyOneSample()
71 assertThat(stats.n).isEqualTo(2); in testRegisterConnectionTime_whenHasAlreadyOneSample()
[all …]
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DExtendedWifiInfo.java52 public void updatePacketRates(@NonNull WifiLinkLayerStats stats, long timeStamp) { in updatePacketRates() argument
53 long txgood = stats.txmpdu_be + stats.txmpdu_bk + stats.txmpdu_vi + stats.txmpdu_vo; in updatePacketRates()
54 long txretries = stats.retries_be + stats.retries_bk + stats.retries_vi + stats.retries_vo; in updatePacketRates()
55 long txbad = stats.lostmpdu_be + stats.lostmpdu_bk + stats.lostmpdu_vi + stats.lostmpdu_vo; in updatePacketRates()
56 long rxgood = stats.rxmpdu_be + stats.rxmpdu_bk + stats.rxmpdu_vi + stats.rxmpdu_vo; in updatePacketRates()
DWifiPowerMetrics.java64 WifiBatteryStats stats = getStats(); in buildProto() local
65 if (stats != null) { in buildProto()
66 m.loggingDurationMs = stats.getLoggingDurationMs(); in buildProto()
67 m.energyConsumedMah = stats.getEnergyConsumedMaMs() in buildProto()
69 m.idleTimeMs = stats.getIdleTimeMs(); in buildProto()
70 m.rxTimeMs = stats.getRxTimeMs(); in buildProto()
71 m.txTimeMs = stats.getTxTimeMs(); in buildProto()
72 m.wifiKernelActiveTimeMs = stats.getKernelActiveTimeMs(); in buildProto()
73 m.numPacketsTx = stats.getNumPacketsTx(); in buildProto()
74 m.numBytesTx = stats.getNumBytesTx(); in buildProto()
[all …]
/frameworks/base/core/java/android/content/
DSyncResult.java101 public final SyncStats stats; field in SyncResult
145 this.stats = new SyncStats(); in SyncResult()
157 stats = new SyncStats(parcel); in SyncResult()
176 return stats.numParseExceptions > 0 in hasHardError()
177 || stats.numConflictDetectedExceptions > 0 in hasHardError()
178 || stats.numAuthExceptions > 0 in hasHardError()
197 return syncAlreadyInProgress || stats.numIoExceptions > 0; in hasSoftError()
214 return ((stats.numDeletes > 0) && !tooManyDeletions) in madeSomeProgress()
215 || stats.numInserts > 0 in madeSomeProgress()
216 || stats.numUpdates > 0; in madeSomeProgress()
[all …]
/frameworks/base/core/jni/
Dandroid_os_Debug.cpp237 static void load_maps(int pid, stats_t* stats, bool* foundSwapPss) in load_maps() argument
369 stats[which_heap].pss += usage.pss; in load_maps()
370 stats[which_heap].swappablePss += swapable_pss; in load_maps()
371 stats[which_heap].rss += usage.rss; in load_maps()
372 stats[which_heap].privateDirty += usage.private_dirty; in load_maps()
373 stats[which_heap].sharedDirty += usage.shared_dirty; in load_maps()
374 stats[which_heap].privateClean += usage.private_clean; in load_maps()
375 stats[which_heap].sharedClean += usage.shared_clean; in load_maps()
376 stats[which_heap].swappedOut += usage.swap; in load_maps()
377 stats[which_heap].swappedOutPss += usage.swap_pss; in load_maps()
[all …]
/frameworks/base/core/java/android/app/usage/
DEventStats.java64 public EventStats(EventStats stats) { in EventStats() argument
65 mEventType = stats.mEventType; in EventStats()
66 mBeginTimeStamp = stats.mBeginTimeStamp; in EventStats()
67 mEndTimeStamp = stats.mEndTimeStamp; in EventStats()
68 mLastEventTime = stats.mLastEventTime; in EventStats()
69 mTotalTime = stats.mTotalTime; in EventStats()
70 mCount = stats.mCount; in EventStats()
166 EventStats stats = new EventStats();
167 stats.mEventType = in.readInt();
168 stats.mBeginTimeStamp = in.readLong();
[all …]
DConfigurationStats.java72 public ConfigurationStats(ConfigurationStats stats) { in ConfigurationStats() argument
73 mConfiguration = stats.mConfiguration; in ConfigurationStats()
74 mBeginTimeStamp = stats.mBeginTimeStamp; in ConfigurationStats()
75 mEndTimeStamp = stats.mEndTimeStamp; in ConfigurationStats()
76 mLastTimeActive = stats.mLastTimeActive; in ConfigurationStats()
77 mTotalTimeActive = stats.mTotalTimeActive; in ConfigurationStats()
78 mActivationCount = stats.mActivationCount; in ConfigurationStats()
152 ConfigurationStats stats = new ConfigurationStats();
154 stats.mConfiguration = Configuration.CREATOR.createFromParcel(source);
156 stats.mBeginTimeStamp = source.readLong();
[all …]
/frameworks/base/services/usage/java/com/android/server/usage/
DUsageStatsProto.java68 UsageStats stats; in loadUsageStats() local
72 stats = statsOut.getOrCreateUsageStats( in loadUsageStats()
76 stats = statsOut.getOrCreateUsageStats( in loadUsageStats()
80 stats = new UsageStats(); in loadUsageStats()
89 tempPackage.mLastTimeUsed = stats.mLastTimeUsed; in loadUsageStats()
90 tempPackage.mTotalTimeInForeground = stats.mTotalTimeInForeground; in loadUsageStats()
91 tempPackage.mLastEvent = stats.mLastEvent; in loadUsageStats()
92 tempPackage.mAppLaunchCount = stats.mAppLaunchCount; in loadUsageStats()
93 stats = tempPackage; in loadUsageStats()
99 tempPackageIndex.mLastTimeUsed = stats.mLastTimeUsed; in loadUsageStats()
[all …]
DUsageStatsDatabase.java186 boolean checkin(IntervalStats stats); in checkin() argument
219 IntervalStats stats = new IntervalStats(); in checkinDailyFiles() local
221 readLocked(files.valueAt(i), stats); in checkinDailyFiles() local
222 if (!checkinAction.checkin(stats)) { in checkinDailyFiles()
496 IntervalStats stats = new IntervalStats(); in continueUpgradeLocked() local
497 readLocked(new AtomicFile(files[j]), stats, version); in continueUpgradeLocked()
499 Long.toString(stats.beginTime))), stats, mCurrentVersion); in continueUpgradeLocked()
572 IntervalStats stats = new IntervalStats(); in getLatestUsageStats() local
573 readLocked(f, stats); in getLatestUsageStats()
574 return stats; in getLatestUsageStats()
[all …]
DUsageStatsXmlV1.java91 final UsageStats stats = statsOut.getOrCreateUsageStats(pkg); in loadUsageStats() local
94 stats.mLastTimeUsed = statsOut.beginTime + XmlUtils.readLongAttribute( in loadUsageStats()
98 stats.mLastTimeVisible = statsOut.beginTime + XmlUtils.readLongAttribute( in loadUsageStats()
105 stats.mLastTimeForegroundServiceUsed = statsOut.beginTime + XmlUtils.readLongAttribute( in loadUsageStats()
111 stats.mTotalTimeInForeground = XmlUtils.readLongAttribute(parser, TOTAL_TIME_ACTIVE_ATTR); in loadUsageStats()
114 stats.mTotalTimeVisible = XmlUtils.readLongAttribute(parser, TOTAL_TIME_VISIBLE_ATTR); in loadUsageStats()
120 stats.mTotalTimeForegroundServiceUsed = XmlUtils.readLongAttribute(parser, in loadUsageStats()
126 stats.mLastEvent = XmlUtils.readIntAttribute(parser, LAST_EVENT_ATTR); in loadUsageStats()
127 stats.mAppLaunchCount = XmlUtils.readIntAttribute(parser, APP_LAUNCH_COUNT_ATTR, in loadUsageStats()
140 loadChooserCounts(parser, stats, action); in loadUsageStats()
[all …]
/frameworks/base/services/backup/java/com/android/server/backup/transport/
DTransportStats.java35 Stats stats = mTransportStats.get(transportComponent); in registerConnectionTime() local
36 if (stats == null) { in registerConnectionTime()
37 stats = new Stats(); in registerConnectionTime()
38 mTransportStats.put(transportComponent, stats); in registerConnectionTime()
40 stats.register(timeMs); in registerConnectionTime()
48 Stats stats = mTransportStats.get(transportComponent); in getStatsForTransport() local
49 if (stats == null) { in getStatsForTransport()
52 return new Stats(stats); in getStatsForTransport()
66 Stats stats = mTransportStats.get(transportComponent); in dump() local
68 dumpStats(pw, " ", stats); in dump()
[all …]
/frameworks/base/tests/FlickerTests/lib/src/com/android/server/wm/flicker/monitor/
DWindowAnimationFrameStatsMonitor.java39 private FrameStats stats; field in WindowAnimationFrameStatsMonitor
52 int frameCount = stats.getFrameCount(); in analyze()
53 long refreshPeriodNano = stats.getRefreshPeriodNano(); in analyze()
58 if (stats.getFramePresentedTimeNano(i) == UNDEFINED_TIME_NANO) { in analyze()
63 long frameDurationNano = stats.getFramePresentedTimeNano(i) - in analyze()
64 stats.getFramePresentedTimeNano(i - 1); in analyze()
85 stats = mInstrumentation.getUiAutomation().getWindowAnimationFrameStats(); in stop()
90 return stats.getFrameCount() > 0 && numJankyFrames > 0; in jankyFramesDetected()
95 return stats.toString() + in toString()
96 " RefreshPeriodNano:" + stats.getRefreshPeriodNano() + in toString()
/frameworks/base/services/tests/servicestests/src/com/android/server/location/
DLocationRequestStatisticsTest.java39 PackageStatistics stats = mStatistics.statistics.values().iterator().next(); in testSinglePackage() local
40 verifyStatisticsTimes(stats); in testSinglePackage()
41 assertEquals(INTERVAL1, stats.getFastestIntervalMs()); in testSinglePackage()
42 assertEquals(INTERVAL1, stats.getSlowestIntervalMs()); in testSinglePackage()
43 assertTrue(stats.isActive()); in testSinglePackage()
58 PackageStatistics stats = mStatistics.statistics.values().iterator().next(); in testSinglePackage_stopAndRestart() local
59 verifyStatisticsTimes(stats); in testSinglePackage_stopAndRestart()
60 assertEquals(INTERVAL1, stats.getFastestIntervalMs()); in testSinglePackage_stopAndRestart()
61 assertEquals(INTERVAL1, stats.getSlowestIntervalMs()); in testSinglePackage_stopAndRestart()
62 assertTrue(stats.isActive()); in testSinglePackage_stopAndRestart()
[all …]

12345678910>>...12