/frameworks/base/core/tests/coretests/src/android/net/ |
D | NetworkStatsHistoryTest.java | 55 private NetworkStatsHistory stats; field in NetworkStatsHistoryTest 60 if (stats != null) { in tearDown() 61 assertConsistent(stats); in tearDown() 93 stats = new NetworkStatsHistory(BUCKET_SIZE); in testRecordSingleBucket() 96 stats.recordData(TEST_START, TEST_START + SECOND_IN_MILLIS, in testRecordSingleBucket() 99 assertEquals(1, stats.size()); in testRecordSingleBucket() 100 assertValues(stats, 0, SECOND_IN_MILLIS, 1024L, 10L, 2048L, 20L, 2L); in testRecordSingleBucket() 105 stats = new NetworkStatsHistory(bucketDuration); in testRecordEqualBuckets() 109 stats.recordData(recordStart, recordStart + bucketDuration, in testRecordEqualBuckets() 112 assertEquals(2, stats.size()); in testRecordEqualBuckets() [all …]
|
D | NetworkStatsTest.java | 43 final NetworkStats stats = new NetworkStats(TEST_START, 3) in testFindIndex() local 48 assertEquals(2, stats.findIndex(TEST_IFACE, 102, SET_DEFAULT, TAG_NONE)); in testFindIndex() 49 assertEquals(2, stats.findIndex(TEST_IFACE, 102, SET_DEFAULT, TAG_NONE)); in testFindIndex() 50 assertEquals(0, stats.findIndex(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE)); in testFindIndex() 51 assertEquals(-1, stats.findIndex(TEST_IFACE, 6, SET_DEFAULT, TAG_NONE)); in testFindIndex() 55 final NetworkStats stats = new NetworkStats(TEST_START, 3) in testFindIndexHinted() local 64 for (int hint = 0; hint < stats.size(); hint++) { in testFindIndexHinted() 65 assertEquals(0, stats.findIndexHinted(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, hint)); in testFindIndexHinted() 66 assertEquals(1, stats.findIndexHinted(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, hint)); in testFindIndexHinted() 67 assertEquals(2, stats.findIndexHinted(TEST_IFACE, 102, SET_DEFAULT, TAG_NONE, hint)); in testFindIndexHinted() [all …]
|
/frameworks/base/core/jni/ |
D | android_net_TrafficStats.cpp | 58 static uint64_t getStatsType(struct Stats* stats, StatsType type) { in getStatsType() argument 61 return stats->rxBytes; in getStatsType() 63 return stats->rxPackets; in getStatsType() 65 return stats->txBytes; in getStatsType() 67 return stats->txPackets; in getStatsType() 69 return stats->tcpRxPackets; in getStatsType() 71 return stats->tcpTxPackets; in getStatsType() 77 static int parseIfaceStats(const char* iface, struct Stats* stats) { in parseIfaceStats() argument 98 stats->rxBytes += rxBytes; in parseIfaceStats() 99 stats->rxPackets += rxPackets; in parseIfaceStats() [all …]
|
D | android_os_Debug.cpp | 224 static void read_mapinfo(FILE *fp, stats_t* stats) in read_mapinfo() argument 400 stats[whichHeap].pss += pss; in read_mapinfo() 401 stats[whichHeap].swappablePss += swappable_pss; in read_mapinfo() 402 stats[whichHeap].privateDirty += private_dirty; in read_mapinfo() 403 stats[whichHeap].sharedDirty += shared_dirty; in read_mapinfo() 404 stats[whichHeap].privateClean += private_clean; in read_mapinfo() 405 stats[whichHeap].sharedClean += shared_clean; in read_mapinfo() 406 stats[whichHeap].swappedOut += swapped_out; in read_mapinfo() 408 stats[subHeap].pss += pss; in read_mapinfo() 409 stats[subHeap].swappablePss += swappable_pss; in read_mapinfo() [all …]
|
D | com_android_internal_net_NetworkStatsFactory.cpp | 96 static int readNetworkStatsDetail(JNIEnv* env, jclass clazz, jobject stats, in readNetworkStatsDetail() argument 226 bool grow = size > env->GetIntField(stats, gNetworkStatsClassInfo.capacity); in readNetworkStatsDetail() 228 ScopedLocalRef<jobjectArray> iface(env, get_string_array(env, stats, in readNetworkStatsDetail() 231 ScopedIntArrayRW uid(env, get_int_array(env, stats, in readNetworkStatsDetail() 234 ScopedIntArrayRW set(env, get_int_array(env, stats, in readNetworkStatsDetail() 237 ScopedIntArrayRW tag(env, get_int_array(env, stats, in readNetworkStatsDetail() 240 ScopedLongArrayRW rxBytes(env, get_long_array(env, stats, in readNetworkStatsDetail() 243 ScopedLongArrayRW rxPackets(env, get_long_array(env, stats, in readNetworkStatsDetail() 246 ScopedLongArrayRW txBytes(env, get_long_array(env, stats, in readNetworkStatsDetail() 249 ScopedLongArrayRW txPackets(env, get_long_array(env, stats, in readNetworkStatsDetail() [all …]
|
/frameworks/base/core/tests/coretests/src/com/android/internal/net/ |
D | NetworkStatsFactoryTest.java | 75 final NetworkStats stats = mFactory.readNetworkStatsDetail(); in testNetworkStatsDetail() local 76 assertEquals(70, stats.size()); in testNetworkStatsDetail() 77 assertStatsEntry(stats, "wlan0", 0, SET_DEFAULT, 0x0, 18621L, 2898L); in testNetworkStatsDetail() 78 assertStatsEntry(stats, "wlan0", 10011, SET_DEFAULT, 0x0, 35777L, 5718L); in testNetworkStatsDetail() 79 assertStatsEntry(stats, "wlan0", 10021, SET_DEFAULT, 0x7fffff01, 562386L, 49228L); in testNetworkStatsDetail() 80 assertStatsEntry(stats, "rmnet1", 10021, SET_DEFAULT, 0x30100000, 219110L, 227423L); in testNetworkStatsDetail() 81 assertStatsEntry(stats, "rmnet2", 10001, SET_DEFAULT, 0x0, 1125899906842624L, 984L); in testNetworkStatsDetail() 101 final NetworkStats stats = mFactory.readNetworkStatsDetail(); in testNetworkStatsWithSet() local 102 assertEquals(70, stats.size()); in testNetworkStatsWithSet() 103 … assertStatsEntry(stats, "rmnet1", 10021, SET_DEFAULT, 0x30100000, 219110L, 578L, 227423L, 676L); in testNetworkStatsWithSet() [all …]
|
/frameworks/base/core/java/android/app/usage/ |
D | UsageStats.java | 69 public UsageStats(UsageStats stats) { in UsageStats() argument 70 mPackageName = stats.mPackageName; in UsageStats() 71 mBeginTimeStamp = stats.mBeginTimeStamp; in UsageStats() 72 mEndTimeStamp = stats.mEndTimeStamp; in UsageStats() 73 mLastTimeUsed = stats.mLastTimeUsed; in UsageStats() 74 mTotalTimeInForeground = stats.mTotalTimeInForeground; in UsageStats() 75 mLaunchCount = stats.mLaunchCount; in UsageStats() 76 mLastEvent = stats.mLastEvent; in UsageStats() 161 UsageStats stats = new UsageStats(); 162 stats.mPackageName = in.readString(); [all …]
|
D | ConfigurationStats.java | 64 public ConfigurationStats(ConfigurationStats stats) { in ConfigurationStats() argument 65 mConfiguration = stats.mConfiguration; in ConfigurationStats() 66 mBeginTimeStamp = stats.mBeginTimeStamp; in ConfigurationStats() 67 mEndTimeStamp = stats.mEndTimeStamp; in ConfigurationStats() 68 mLastTimeActive = stats.mLastTimeActive; in ConfigurationStats() 69 mTotalTimeActive = stats.mTotalTimeActive; in ConfigurationStats() 70 mActivationCount = stats.mActivationCount; in ConfigurationStats() 144 ConfigurationStats stats = new ConfigurationStats(); 146 stats.mConfiguration = Configuration.CREATOR.createFromParcel(source); 148 stats.mBeginTimeStamp = source.readLong(); [all …]
|
D | UsageStatsManager.java | 202 List<UsageStats> stats = queryUsageStats(INTERVAL_BEST, beginTime, endTime); in queryAndAggregateUsageStats() local 203 if (stats.isEmpty()) { in queryAndAggregateUsageStats() 208 final int statCount = stats.size(); in queryAndAggregateUsageStats() 210 UsageStats newStat = stats.get(i); in queryAndAggregateUsageStats()
|
/frameworks/base/wifi/java/android/net/wifi/ |
D | WifiConnectionStatistics.java | 64 WifiNetworkConnectionStatistics stats; in incrementOrAddUntrusted() local 68 stats = untrustedNetworkHistory.get(SSID); in incrementOrAddUntrusted() 69 if (stats != null){ in incrementOrAddUntrusted() 70 stats.numConnection = connection + stats.numConnection; in incrementOrAddUntrusted() 71 stats.numUsage = usage + stats.numUsage; in incrementOrAddUntrusted() 74 stats = new WifiNetworkConnectionStatistics(connection, usage); in incrementOrAddUntrusted() 76 if (stats != null) { in incrementOrAddUntrusted() 77 untrustedNetworkHistory.put(SSID, stats); in incrementOrAddUntrusted() 91 WifiNetworkConnectionStatistics stats = untrustedNetworkHistory.get(Key); in toString() local 92 if (stats != null) { in toString() [all …]
|
D | WifiInfo.java | 153 public void updatePacketRates(WifiLinkLayerStats stats) { in updatePacketRates() argument 154 if (stats != null) { in updatePacketRates() 155 long txgood = stats.txmpdu_be + stats.txmpdu_bk + stats.txmpdu_vi + stats.txmpdu_vo; in updatePacketRates() 156 long txretries = stats.retries_be + stats.retries_bk in updatePacketRates() 157 + stats.retries_vi + stats.retries_vo; in updatePacketRates() 158 long rxgood = stats.rxmpdu_be + stats.rxmpdu_bk + stats.rxmpdu_vi + stats.rxmpdu_vo; in updatePacketRates() 159 long txbad = stats.lostmpdu_be + stats.lostmpdu_bk in updatePacketRates() 160 + stats.lostmpdu_vi + stats.lostmpdu_vo; in updatePacketRates()
|
D | WifiLinkLayerStats.java | 196 WifiLinkLayerStats stats = new WifiLinkLayerStats(); 197 stats.SSID = in.readString(); 198 stats.BSSID = in.readString(); 199 stats.on_time = in.readInt(); 200 stats.tx_time = in.readInt(); 201 stats.rx_time = in.readInt(); 202 stats.on_time_scan = in.readInt(); 203 return stats;
|
/frameworks/base/core/java/android/content/ |
D | SyncResult.java | 91 public final SyncStats stats; field in SyncResult 135 this.stats = new SyncStats(); in SyncResult() 147 stats = new SyncStats(parcel); in SyncResult() 166 return stats.numParseExceptions > 0 in hasHardError() 167 || stats.numConflictDetectedExceptions > 0 in hasHardError() 168 || stats.numAuthExceptions > 0 in hasHardError() 187 return syncAlreadyInProgress || stats.numIoExceptions > 0; in hasSoftError() 204 return ((stats.numDeletes > 0) && !tooManyDeletions) in madeSomeProgress() 205 || stats.numInserts > 0 in madeSomeProgress() 206 || stats.numUpdates > 0; in madeSomeProgress() [all …]
|
/frameworks/base/services/usage/java/com/android/server/usage/ |
D | UsageStatsXmlV1.java | 67 final UsageStats stats = statsOut.getOrCreateUsageStats(pkg); in loadUsageStats() local 70 stats.mLastTimeUsed = statsOut.beginTime + XmlUtils.readLongAttribute( in loadUsageStats() 73 stats.mTotalTimeInForeground = XmlUtils.readLongAttribute(parser, TOTAL_TIME_ACTIVE_ATTR); in loadUsageStats() 74 stats.mLastEvent = XmlUtils.readIntAttribute(parser, LAST_EVENT_ATTR); in loadUsageStats() 121 private static void writeUsageStats(XmlSerializer xml, final IntervalStats stats, in writeUsageStats() argument 127 usageStats.mLastTimeUsed - stats.beginTime); in writeUsageStats() 136 private static void writeConfigStats(XmlSerializer xml, final IntervalStats stats, in writeConfigStats() argument 142 configStats.mLastTimeActive - stats.beginTime); in writeConfigStats() 156 private static void writeEvent(XmlSerializer xml, final IntervalStats stats, in writeEvent() argument 161 XmlUtils.writeLongAttribute(xml, TIME_ATTR, event.mTimeStamp - stats.beginTime); in writeEvent() [all …]
|
D | UserUsageStatsService.java | 166 for (IntervalStats stats : mCurrentStats) { in reportEvent() 168 stats.updateConfigurationStats(newFullConfig, event.mTimeStamp); in reportEvent() 170 stats.update(event.mPackage, event.mTimeStamp, event.mEventType); in reportEvent() 180 public void combine(IntervalStats stats, boolean mutable, 183 accResult.addAll(stats.packageStats.values()); 187 final int statCount = stats.packageStats.size(); 189 accResult.add(new UsageStats(stats.packageStats.valueAt(i))); 197 public void combine(IntervalStats stats, boolean mutable, 200 accResult.addAll(stats.configurations.values()); 204 final int configCount = stats.configurations.size(); [all …]
|
D | UsageStatsDatabase.java | 101 boolean checkin(IntervalStats stats); in checkin() argument 134 IntervalStats stats = new IntervalStats(); in checkinDailyFiles() local 136 UsageStatsXml.read(files.valueAt(i), stats); in checkinDailyFiles() local 137 if (!checkinAction.checkin(stats)) { in checkinDailyFiles() 287 IntervalStats stats = new IntervalStats(); in getLatestUsageStats() local 288 UsageStatsXml.read(f, stats); in getLatestUsageStats() 289 return stats; in getLatestUsageStats() 331 void combine(IntervalStats stats, boolean mutable, List<T> accumulatedResult); in combine() argument 382 IntervalStats stats = new IntervalStats(); in queryUsageStats() local 391 UsageStatsXml.read(f, stats); in queryUsageStats() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/location/ |
D | LocationRequestStatisticsTest.java | 39 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 …]
|
/frameworks/base/core/java/com/android/internal/net/ |
D | NetworkStatsFactory.java | 95 final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 6); in readNetworkStatsSummaryDev() local 124 stats.addValues(entry); in readNetworkStatsSummaryDev() 135 return stats; in readNetworkStatsSummaryDev() 151 final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 6); in readNetworkStatsSummaryXt() 171 stats.addValues(entry); in readNetworkStatsSummaryXt() 182 return stats; in readNetworkStatsSummaryXt() 191 final NetworkStats stats = readNetworkStatsDetailInternal(limitUid, limitIfaces, limitTag, in readNetworkStatsDetail() local 207 for (int j = 0; j < stats.size(); j++) { in readNetworkStatsDetail() 208 entry = stats.getValues(j, entry); in readNetworkStatsDetail() 214 stats.combineValues(adjust); in readNetworkStatsDetail() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/ |
D | LoadAverageService.java | 182 final CpuTracker stats = mStats; in onDraw() local 183 final int userTime = stats.getLastUserTime(); in onDraw() 184 final int systemTime = stats.getLastSystemTime(); in onDraw() 185 final int iowaitTime = stats.getLastIoWaitTime(); in onDraw() 186 final int irqTime = stats.getLastIrqTime(); in onDraw() 187 final int softIrqTime = stats.getLastSoftIrqTime(); in onDraw() 188 final int idleTime = stats.getLastIdleTime(); in onDraw() 217 canvas.drawText(stats.mLoadText, RIGHT-paddingRight-stats.mLoadWidth-1, in onDraw() 219 canvas.drawText(stats.mLoadText, RIGHT-paddingRight-stats.mLoadWidth-1, in onDraw() 221 canvas.drawText(stats.mLoadText, RIGHT-paddingRight-stats.mLoadWidth+1, in onDraw() [all …]
|
/frameworks/base/services/core/java/com/android/server/notification/ |
D | NotificationUsageStats.java | 68 notification.stats = new SingleNotificationStats(); in registerPostedByApp() 69 notification.stats.posttimeElapsedMs = SystemClock.elapsedRealtime(); in registerPostedByApp() 70 for (AggregatedStats stats : getAggregatedStatsLocked(notification)) { in registerPostedByApp() 71 stats.numPostedByApp++; in registerPostedByApp() 82 notification.stats = old.stats; in registerUpdatedByApp() 83 for (AggregatedStats stats : getAggregatedStatsLocked(notification)) { in registerUpdatedByApp() 84 stats.numUpdatedByApp++; in registerUpdatedByApp() 92 notification.stats.onRemoved(); in registerRemovedByApp() 93 for (AggregatedStats stats : getAggregatedStatsLocked(notification)) { in registerRemovedByApp() 94 stats.numRemovedByApp++; in registerRemovedByApp() [all …]
|
/frameworks/base/packages/FusedLocation/src/com/android/location/fused/ |
D | FusionEngine.java | 132 ProviderStats stats = mStats.get(name); in enableProvider() local 134 if (stats.available) { in enableProvider() 135 if (!stats.requested) { in enableProvider() 136 stats.requestTime = SystemClock.elapsedRealtime(); in enableProvider() 137 stats.requested = true; in enableProvider() 138 stats.minTime = minTime; in enableProvider() 140 } else if (stats.minTime != minTime) { in enableProvider() 141 stats.minTime = minTime; in enableProvider() 148 ProviderStats stats = mStats.get(name); in disableProvider() local 150 if (stats.requested) { in disableProvider() [all …]
|
/frameworks/base/services/core/java/com/android/server/location/ |
D | LocationRequestStatistics.java | 29 PackageStatistics stats = statistics.get(key); in startRequesting() local 30 if (stats == null) { in startRequesting() 31 stats = new PackageStatistics(); in startRequesting() 32 statistics.put(key, stats); in startRequesting() 34 stats.startRequesting(intervalMs); in startRequesting() 45 PackageStatistics stats = statistics.get(key); in stopRequesting() local 46 if (stats != null) { in stopRequesting() 47 stats.stopRequesting(); in stopRequesting()
|
/frameworks/base/core/java/android/database/sqlite/ |
D | SQLiteDebug.java | 32 private static native void nativeGetPagerStats(PagerStats stats); in nativeGetPagerStats() argument 151 PagerStats stats = new PagerStats(); in getDatabaseInfo() local 152 nativeGetPagerStats(stats); in getDatabaseInfo() 153 stats.dbStats = SQLiteDatabase.getDbStats(); in getDatabaseInfo() 154 return stats; in getDatabaseInfo()
|
/frameworks/base/tests/DataIdleTest/src/com/android/tests/dataidle/ |
D | DataIdleTest.java | 79 final NetworkStats stats = session.getSummaryForAllUid( in fetchStats() local 81 reportStats(stats); in fetchStats() 93 void reportStats(NetworkStats stats) { in reportStats() argument 99 for (int i = 0; i < stats.size(); ++i) { in reportStats() 101 Entry statsEntry = stats.getValues(i, null); in reportStats()
|
/frameworks/base/tests/UsageStatsTest/src/com/android/tests/usagestats/ |
D | UsageStatsActivity.java | 87 Map<String, UsageStats> stats = mUsageStatsManager.queryAndAggregateUsageStats( in updateAdapter() local 89 mAdapter.update(stats); in updateAdapter() 95 public void update(Map<String, UsageStats> stats) { in update() argument 97 if (stats == null) { in update() 101 mStats.addAll(stats.values()); in update()
|