Home
last modified time | relevance | path

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

12

/frameworks/base/core/tests/coretests/src/android/net/
DNetworkStatsHistoryTest.java57 private NetworkStatsHistory stats; field in NetworkStatsHistoryTest
62 if (stats != null) { in tearDown()
63 assertConsistent(stats); in tearDown()
95 stats = new NetworkStatsHistory(BUCKET_SIZE); in testRecordSingleBucket()
98 stats.recordData(TEST_START, TEST_START + SECOND_IN_MILLIS, in testRecordSingleBucket()
101 assertEquals(1, stats.size()); in testRecordSingleBucket()
102 assertValues(stats, 0, SECOND_IN_MILLIS, 1024L, 10L, 2048L, 20L, 2L); in testRecordSingleBucket()
107 stats = new NetworkStatsHistory(bucketDuration); in testRecordEqualBuckets()
111 stats.recordData(recordStart, recordStart + bucketDuration, in testRecordEqualBuckets()
114 assertEquals(2, stats.size()); in testRecordEqualBuckets()
[all …]
DNetworkStatsTest.java43 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, 2); in testAddEntryGrow() local
57 assertEquals(0, stats.size()); in testAddEntryGrow()
58 assertEquals(2, stats.internalSize()); in testAddEntryGrow()
60 stats.addValues(TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, 1L, 1L, 2L, 2L, 3); in testAddEntryGrow()
61 stats.addValues(TEST_IFACE, TEST_UID, SET_DEFAULT, TAG_NONE, 2L, 2L, 2L, 2L, 4); in testAddEntryGrow()
[all …]
/frameworks/base/core/tests/coretests/src/com/android/internal/net/
DNetworkStatsFactoryTest.java73 final NetworkStats stats = mFactory.readNetworkStatsDetail(); in testNetworkStatsDetail() local
74 assertEquals(31, stats.size()); in testNetworkStatsDetail()
75 assertStatsEntry(stats, "wlan0", 0, SET_DEFAULT, 0, 14615L, 4270L); in testNetworkStatsDetail()
76 assertStatsEntry(stats, "wlan0", 10004, SET_DEFAULT, 0, 333821L, 53558L); in testNetworkStatsDetail()
77 assertStatsEntry(stats, "wlan0", 10004, SET_DEFAULT, 1947740890, 18725L, 1066L); in testNetworkStatsDetail()
78 assertStatsEntry(stats, "rmnet0", 10037, SET_DEFAULT, 0, 31184994L, 684122L); in testNetworkStatsDetail()
79 assertStatsEntry(stats, "rmnet0", 10037, SET_DEFAULT, 1947740890, 28507378L, 437004L); in testNetworkStatsDetail()
85 final NetworkStats stats = mFactory.readNetworkStatsDetail(); in testNetworkStatsDetailExtended() local
86 assertEquals(2, stats.size()); in testNetworkStatsDetailExtended()
87 assertStatsEntry(stats, "test0", 1000, SET_DEFAULT, 0, 1024L, 2048L); in testNetworkStatsDetailExtended()
[all …]
/frameworks/base/core/java/android/content/
DSyncResult.java91 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()
199 return ((stats.numDeletes > 0) && !tooManyDeletions) in madeSomeProgress()
200 || stats.numInserts > 0 in madeSomeProgress()
201 || stats.numUpdates > 0; in madeSomeProgress()
[all …]
DSyncManager.java1326 for (AccountSyncStats stats: sortedAccounts) { in dumpRecentHistory()
1327 elapsedTime = stats.elapsedTime; in dumpRecentHistory()
1328 times = stats.times; in dumpRecentHistory()
1335 pw.printf(accountFormat, stats.name, timesStr, timeStr); in dumpRecentHistory()
1681 syncResult.stats.numIoExceptions++; in handleMessage()
2151 syncOperation.authority, syncResult.stats.numDeletes);
2184 if (syncResult.stats.numAuthExceptions > 0)
2186 if (syncResult.stats.numIoExceptions > 0)
2188 if (syncResult.stats.numParseExceptions > 0)
2190 if (syncResult.stats.numConflictDetectedExceptions > 0)
/frameworks/base/packages/SystemUI/src/com/android/systemui/
DLoadAverageService.java182 final Stats 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()
216 canvas.drawText(stats.mLoadText, RIGHT-mPaddingRight-stats.mLoadWidth-1, in onDraw()
218 canvas.drawText(stats.mLoadText, RIGHT-mPaddingRight-stats.mLoadWidth-1, in onDraw()
220 canvas.drawText(stats.mLoadText, RIGHT-mPaddingRight-stats.mLoadWidth+1, in onDraw()
[all …]
/frameworks/base/core/jni/
Dandroid_os_Debug.cpp117 static void read_mapinfo(FILE *fp, stats_t* stats) in read_mapinfo() argument
220 stats[whichHeap].pss += pss; in read_mapinfo()
221 stats[whichHeap].privateDirty += private_dirty; in read_mapinfo()
222 stats[whichHeap].sharedDirty += shared_dirty; in read_mapinfo()
227 static void load_maps(int pid, stats_t* stats) in load_maps() argument
236 read_mapinfo(fp, stats); in load_maps()
243 stats_t stats[_NUM_HEAP]; in android_os_Debug_getDirtyPagesPid() local
244 memset(&stats, 0, sizeof(stats)); in android_os_Debug_getDirtyPagesPid()
246 load_maps(pid, stats); in android_os_Debug_getDirtyPagesPid()
249 stats[HEAP_UNKNOWN].pss += stats[i].pss; in android_os_Debug_getDirtyPagesPid()
[all …]
/frameworks/base/core/java/android/database/sqlite/
DSQLiteDebug.java153 PagerStats stats = new PagerStats(); in getDatabaseInfo() local
154 getPagerStats(stats); in getDatabaseInfo()
155 stats.dbStats = SQLiteDatabase.getDbStats(); in getDatabaseInfo()
156 return stats; in getDatabaseInfo()
162 public static native void getPagerStats(PagerStats stats); in getPagerStats() argument
/frameworks/base/tests/DataIdleTest/src/com/android/tests/dataidle/
DDataIdleTest.java76 NetworkStats stats = mStatsService.getSummaryForAllUid(template, Long.MIN_VALUE, in fetchStats() local
78 reportStats(stats); in fetchStats()
88 void reportStats(NetworkStats stats) { in reportStats() argument
94 for (int i = 0; i < stats.size(); ++i) { in reportStats()
96 Entry statsEntry = stats.getValues(i, null); in reportStats()
/frameworks/base/core/java/com/android/internal/net/
DNetworkStatsFactory.java107 final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 6); in readNetworkStatsSummarySingleFile() local
146 stats.addValues(entry); in readNetworkStatsSummarySingleFile()
157 return stats; in readNetworkStatsSummarySingleFile()
165 final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 6); in readNetworkStatsSummaryMultipleFiles() local
194 stats.addValues(entry); in readNetworkStatsSummaryMultipleFiles()
224 stats.combineValues(entry); in readNetworkStatsSummaryMultipleFiles()
227 stats.addValues(entry); in readNetworkStatsSummaryMultipleFiles()
243 return stats; in readNetworkStatsSummaryMultipleFiles()
257 final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 24); in readNetworkStatsDetail() local
305 stats.addValues(entry); in readNetworkStatsDetail()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/
DNetworkStatsServiceTest.java635 NetworkStats stats = mService.getSummaryForAllUid( in testSummaryForAllUid() local
637 assertEquals(3, stats.size()); in testSummaryForAllUid()
638 assertValues(stats, IFACE_ALL, UID_RED, SET_DEFAULT, TAG_NONE, 50L, 5L, 50L, 5L, 1); in testSummaryForAllUid()
639 assertValues(stats, IFACE_ALL, UID_RED, SET_DEFAULT, 0xF00D, 10L, 1L, 10L, 1L, 1); in testSummaryForAllUid()
640 assertValues(stats, IFACE_ALL, UID_BLUE, SET_DEFAULT, TAG_NONE, 2048L, 16L, 1024L, 8L, 0); in testSummaryForAllUid()
644 stats = mService.getSummaryForAllUid( in testSummaryForAllUid()
646 assertEquals(1, stats.size()); in testSummaryForAllUid()
647 assertValues(stats, IFACE_ALL, UID_BLUE, SET_DEFAULT, TAG_NONE, 1024L, 8L, 512L, 4L, 0); in testSummaryForAllUid()
706 final NetworkStats stats = mService.getSummaryForAllUid( in testForegroundBackground() local
708 assertEquals(4, stats.size()); in testForegroundBackground()
[all …]
DNetworkPolicyManagerServiceTest.java496 NetworkStats stats = null; in testNetworkPolicyAppliedCycleLastMonth() local
524 stats = new NetworkStats(getElapsedRealtime(), 1) in testNetworkPolicyAppliedCycleLastMonth()
527 .andReturn(stats).atLeastOnce(); in testNetworkPolicyAppliedCycleLastMonth()
568 NetworkStats stats = null; in testOverWarningLimitNotification() local
580 stats = new NetworkStats(getElapsedRealtime(), 1) in testOverWarningLimitNotification()
587 .andReturn(stats).atLeastOnce(); in testOverWarningLimitNotification()
602 stats = new NetworkStats(getElapsedRealtime(), 1) in testOverWarningLimitNotification()
609 .andReturn(stats).atLeastOnce(); in testOverWarningLimitNotification()
625 stats = new NetworkStats(getElapsedRealtime(), 1) in testOverWarningLimitNotification()
631 .andReturn(stats).atLeastOnce(); in testOverWarningLimitNotification()
[all …]
DThrottleServiceTest.java294 final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 1); in expectGetInterfaceCounter() local
295 stats.addValues(TEST_IFACE, UID_ALL, SET_DEFAULT, TAG_NONE, rx, 0L, tx, 0L, 0); in expectGetInterfaceCounter()
297 expect(mMockNMService.getNetworkStatsSummary()).andReturn(stats).atLeastOnce(); in expectGetInterfaceCounter()
/frameworks/base/core/tests/bandwidthtests/src/com/android/bandwidthtest/
DBandwidthTest.java206 NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 1); in fetchDataFromProc() local
207 stats.addValues(NetworkStats.IFACE_ALL, uid, NetworkStats.SET_DEFAULT, in fetchDataFromProc()
209 return stats; in fetchDataFromProc()
232 public void AddStatsToResults(String label, NetworkStats stats, Bundle results){ in AddStatsToResults() argument
239 for (int i = 0; i < stats.size(); ++i) { in AddStatsToResults()
240 Entry statsEntry = stats.getValues(i, null); in AddStatsToResults()
/frameworks/base/services/java/com/android/server/am/
DBackupRecord.java31 final BatteryStatsImpl.Uid.Pkg.Serv stats; field in BackupRecord
41 stats = _agentStats; in BackupRecord()
DServiceRecord.java54 final BatteryStatsImpl.Uid.Pkg.Serv stats; field in ServiceRecord
276 this.stats = servStats; in ServiceRecord()
DActivityManagerService.java2705 BatteryStatsImpl stats = mBatteryStatsService.getActiveStatistics(); in appDiedLocked() local
2706 synchronized (stats) { in appDiedLocked()
2707 stats.noteProcessDiedLocked(app.info.uid, pid); in appDiedLocked()
2841 ProcessStats.Stats stats = processStats.getWorkingStats(i); in dumpStackTraces() local
2842 if (lastPids.indexOfKey(stats.pid) >= 0) { in dumpStackTraces()
2846 Process.sendSignal(stats.pid, Process.SIGNAL_QUIT); in dumpStackTraces()
6086 BatteryStatsImpl stats = mBatteryStatsService.getActiveStatistics(); in newProcessRecordLocked() local
6087 synchronized (stats) { in newProcessRecordLocked()
6088 ps = stats.getProcessStatsLocked(info.uid, proc); in newProcessRecordLocked()
6474 BatteryStatsImpl stats = mBatteryStatsService.getActiveStatistics(); in noteWakeupAlarm() local
[all …]
/frameworks/base/core/tests/coretests/src/android/content/pm/
DAppCacheTest.java549 public PackageStats stats; field in AppCacheTest.PackageStatsObserver
556 stats = pStats; in onGetStatsCompleted()
582 if(localLOGV) Log.i(TAG, "OBSERVER RET VALUES code="+observer.stats.codeSize+ in invokePMGetPackageSizeInfo()
583 ", data="+observer.stats.dataSize+", cache="+observer.stats.cacheSize); in invokePMGetPackageSizeInfo()
584 return observer.stats; in invokePMGetPackageSizeInfo()
597 PackageStats stats = invokePMGetPackageSizeInfo(); in testGetPackageSizeInfo() local
598 assertTrue(stats!=null); in testGetPackageSizeInfo()
600 if(localLOGV) Log.i(TAG, "code="+stats.codeSize+", data="+stats.dataSize+ in testGetPackageSizeInfo()
601 ", cache="+stats.cacheSize); in testGetPackageSizeInfo()
/frameworks/base/core/java/android/net/
DNetworkStats.java311 public void spliceOperationsFrom(NetworkStats stats) { in spliceOperationsFrom() argument
313 final int j = stats.findIndex(IFACE_ALL, uid[i], set[i], tag[i]); in spliceOperationsFrom()
317 operations[i] = stats.operations[j]; in spliceOperationsFrom()
516 final NetworkStats stats = new NetworkStats(elapsedRealtime, 10); in groupedByIface() local
533 stats.combineValues(entry); in groupedByIface()
536 return stats; in groupedByIface()
544 final NetworkStats stats = new NetworkStats(elapsedRealtime, 10); in groupedByUid() local
561 stats.combineValues(entry); in groupedByUid()
564 return stats; in groupedByUid()
/frameworks/base/tools/aapt/
DFileFinder.cpp80 void SystemFileFinder::checkAndAddFile(String8 path, const struct stat* stats, in checkAndAddFile() argument
94 fileStore.add(path,stats->st_mtime); in checkAndAddFile()
DFileFinder.h75 static void checkAndAddFile(String8 path, const struct stat* stats,
/frameworks/base/core/java/com/android/internal/os/
DProcessStats.java631 Stats stats = mProcStats.get(i);
632 if (stats.working) {
633 mWorkingProcs.add(stats);
634 if (stats.threadStats != null && stats.threadStats.size() > 1) {
635 stats.workingThreads.clear();
636 final int M = stats.threadStats.size();
638 Stats tstats = stats.threadStats.get(j);
640 stats.workingThreads.add(tstats);
643 Collections.sort(stats.workingThreads, sLoadComparator);
/frameworks/base/core/java/android/webkit/
DEventLogTags.logtags5 # browser stats for diary study
/frameworks/base/tools/localize/
Dlocalize.cpp297 vector<Stats> stats; in do_export() local
389 stats.push_back(afterFilterStats); in do_export()
417 for (vector<Stats>::iterator it=stats.begin(); it!=stats.end(); it++) { in do_export()
429 if (stats.size() > 1) { in do_export()
/frameworks/base/services/java/com/android/server/net/
DNetworkStatsService.java444 final NetworkStats stats = new NetworkStats(end - start, 1); in getSummaryForNetwork() local
462 stats.combineValues(entry); in getSummaryForNetwork()
466 return stats; in getSummaryForNetwork()
481 final NetworkStats stats = new NetworkStats(end - start, 24); in getSummaryForAllUid() local
505 stats.combineValues(entry); in getSummaryForAllUid()
511 return stats; in getSummaryForAllUid()

12