Home
last modified time | relevance | path

Searched refs:stats (Results 1 – 25 of 298) 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 …]
DPulledStatsTest.java47 PulledStats stats = new PulledStats(0L); in testPulledStats_Empty() local
48 assertEquals(0L, stats.endTimeMs()); in testPulledStats_Empty()
53 PulledStats stats = new PulledStats(0L); in testPulledStats_UnknownReport() local
54 stats.addUndecoratedPackage("foo", 456); in testPulledStats_UnknownReport()
55 stats.addUndecoratedPackage("bar", 123); in testPulledStats_UnknownReport()
59 stats.writeToProto(1023123, proto); // a very large number in testPulledStats_UnknownReport()
72 PulledStats stats = new PulledStats(0L); in testPulledStats_RemoteViewReportPackages() local
74 stats.addUndecoratedPackage(pkg, 111); in testPulledStats_RemoteViewReportPackages()
79 stats.writeToProto(REPORT_REMOTE_VIEWS, protoStream); in testPulledStats_RemoteViewReportPackages()
104 PulledStats stats = new PulledStats(0L); in testPulledStats_RemoteViewReportEndTime() 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/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/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/base/services/core/jni/
Dcom_android_server_net_NetworkStatsService.cpp56 static uint64_t getStatsType(Stats* stats, StatsType type) { in getStatsType() argument
59 return stats->rxBytes; in getStatsType()
61 return stats->rxPackets; in getStatsType()
63 return stats->txBytes; in getStatsType()
65 return stats->txPackets; in getStatsType()
67 return stats->tcpRxPackets; in getStatsType()
69 return stats->tcpTxPackets; in getStatsType()
75 static int parseIfaceStats(const char* iface, Stats* stats) { in parseIfaceStats() argument
96 stats->rxBytes += rxBytes; in parseIfaceStats()
97 stats->rxPackets += rxPackets; in parseIfaceStats()
[all …]
Dcom_android_server_net_NetworkStatsFactory.cpp208 static int statsLinesToNetworkStats(JNIEnv* env, jclass clazz, jobject stats, in statsLinesToNetworkStats() argument
212 bool grow = size > env->GetIntField(stats, gNetworkStatsClassInfo.capacity); in statsLinesToNetworkStats()
214 ScopedLocalRef<jobjectArray> iface(env, get_string_array(env, stats, in statsLinesToNetworkStats()
217 ScopedIntArrayRW uid(env, get_int_array(env, stats, in statsLinesToNetworkStats()
220 ScopedIntArrayRW set(env, get_int_array(env, stats, in statsLinesToNetworkStats()
223 ScopedIntArrayRW tag(env, get_int_array(env, stats, in statsLinesToNetworkStats()
226 ScopedIntArrayRW metered(env, get_int_array(env, stats, in statsLinesToNetworkStats()
229 ScopedIntArrayRW roaming(env, get_int_array(env, stats, in statsLinesToNetworkStats()
232 ScopedIntArrayRW defaultNetwork(env, get_int_array(env, stats, in statsLinesToNetworkStats()
235 ScopedLongArrayRW rxBytes(env, get_long_array(env, stats, in statsLinesToNetworkStats()
[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/tests/net/java/com/android/server/net/
DNetworkStatsFactoryTest.java96 final NetworkStats stats = parseDetailedStats(R.raw.xt_qtaguid_typical); in testNetworkStatsDetail() local
98 assertEquals(70, stats.size()); in testNetworkStatsDetail()
99 assertStatsEntry(stats, "wlan0", 0, SET_DEFAULT, 0x0, 18621L, 2898L); in testNetworkStatsDetail()
100 assertStatsEntry(stats, "wlan0", 10011, SET_DEFAULT, 0x0, 35777L, 5718L); in testNetworkStatsDetail()
101 assertStatsEntry(stats, "wlan0", 10021, SET_DEFAULT, 0x7fffff01, 562386L, 49228L); in testNetworkStatsDetail()
102 assertStatsEntry(stats, "rmnet1", 10021, SET_DEFAULT, 0x30100000, 219110L, 227423L); in testNetworkStatsDetail()
103 assertStatsEntry(stats, "rmnet2", 10001, SET_DEFAULT, 0x0, 1125899906842624L, 984L); in testNetworkStatsDetail()
393 final NetworkStats stats = parseDetailedStats(R.raw.xt_qtaguid_typical); in testNetworkStatsWithSet() local
394 assertEquals(70, stats.size()); in testNetworkStatsWithSet()
395 assertStatsEntry(stats, "rmnet1", 10021, SET_DEFAULT, 0x30100000, 219110L, 578L, 227423L, in testNetworkStatsWithSet()
[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/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 …]
DUsageStats.java149 public UsageStats(UsageStats stats) { in UsageStats() argument
150 mPackageName = stats.mPackageName; in UsageStats()
151 mBeginTimeStamp = stats.mBeginTimeStamp; in UsageStats()
152 mEndTimeStamp = stats.mEndTimeStamp; in UsageStats()
153 mLastTimeUsed = stats.mLastTimeUsed; in UsageStats()
154 mLastTimeVisible = stats.mLastTimeVisible; in UsageStats()
155 mLastTimeForegroundServiceUsed = stats.mLastTimeForegroundServiceUsed; in UsageStats()
156 mTotalTimeInForeground = stats.mTotalTimeInForeground; in UsageStats()
157 mTotalTimeVisible = stats.mTotalTimeVisible; in UsageStats()
158 mTotalTimeForegroundServiceUsed = stats.mTotalTimeForegroundServiceUsed; in UsageStats()
[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/core/jni/
Dandroid_os_Debug.cpp241 static void load_maps(int pid, stats_t* stats, bool* foundSwapPss) in load_maps() argument
390 stats[which_heap].pss += usage.pss; in load_maps()
391 stats[which_heap].swappablePss += swapable_pss; in load_maps()
392 stats[which_heap].rss += usage.rss; in load_maps()
393 stats[which_heap].privateDirty += usage.private_dirty; in load_maps()
394 stats[which_heap].sharedDirty += usage.shared_dirty; in load_maps()
395 stats[which_heap].privateClean += usage.private_clean; in load_maps()
396 stats[which_heap].sharedClean += usage.shared_clean; in load_maps()
397 stats[which_heap].swappedOut += usage.swap; in load_maps()
398 stats[which_heap].swappedOutPss += usage.swap_pss; in load_maps()
[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/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