Searched refs:stats (Results 1 - 25 of 68) sorted by relevance

123

/frameworks/base/core/java/android/app/usage/
H A DUsageStats.java69 public UsageStats(UsageStats stats) { argument
70 mPackageName = stats.mPackageName;
71 mBeginTimeStamp = stats.mBeginTimeStamp;
72 mEndTimeStamp = stats.mEndTimeStamp;
73 mLastTimeUsed = stats.mLastTimeUsed;
74 mTotalTimeInForeground = stats.mTotalTimeInForeground;
75 mLaunchCount = stats.mLaunchCount;
76 mLastEvent = stats.mLastEvent;
161 UsageStats stats = new UsageStats();
162 stats
[all...]
H A DConfigurationStats.java64 public ConfigurationStats(ConfigurationStats stats) { argument
65 mConfiguration = stats.mConfiguration;
66 mBeginTimeStamp = stats.mBeginTimeStamp;
67 mEndTimeStamp = stats.mEndTimeStamp;
68 mLastTimeActive = stats.mLastTimeActive;
69 mTotalTimeActive = stats.mTotalTimeActive;
70 mActivationCount = stats.mActivationCount;
144 ConfigurationStats stats = new ConfigurationStats();
146 stats.mConfiguration = Configuration.CREATOR.createFromParcel(source);
148 stats
[all...]
H A DUsageStatsManager.java101 * Gets application usage stats for the given time range, aggregated by the specified interval.
117 * @param intervalType The time interval by which the stats are aggregated.
118 * @param beginTime The inclusive beginning of the range of stats to include in the results.
119 * @param endTime The exclusive end of the range of stats to include in the results.
147 * @param intervalType The time interval by which the stats are aggregated.
148 * @param beginTime The inclusive beginning of the range of stats to include in the results.
149 * @param endTime The exclusive end of the range of stats to include in the results.
192 * A convenience method that queries for all stats in the given range (using the best interval
196 * @param beginTime The inclusive beginning of the range of stats to include in the results.
197 * @param endTime The exclusive end of the range of stats t
[all...]
/frameworks/base/core/jni/
H A Dandroid_net_TrafficStats.cpp35 static const char* QTAGUID_UID_STATS = "/proc/net/xt_qtaguid/stats";
58 static uint64_t getStatsType(struct Stats* stats, StatsType type) { argument
61 return stats->rxBytes;
63 return stats->rxPackets;
65 return stats->txBytes;
67 return stats->txPackets;
69 return stats->tcpRxPackets;
71 return stats->tcpTxPackets;
77 static int parseIfaceStats(const char* iface, struct Stats* stats) { argument
98 stats
121 parseUidStats(const uint32_t uid, struct Stats* stats) argument
154 struct Stats stats; local
169 struct Stats stats; local
179 struct Stats stats; local
[all...]
H A Dandroid_os_Debug.cpp127 #define BINDER_STATS "/proc/binder/stats"
224 static void read_mapinfo(FILE *fp, stats_t* stats) argument
400 stats[whichHeap].pss += pss;
401 stats[whichHeap].swappablePss += swappable_pss;
402 stats[whichHeap].privateDirty += private_dirty;
403 stats[whichHeap].sharedDirty += shared_dirty;
404 stats[whichHeap].privateClean += private_clean;
405 stats[whichHeap].sharedClean += shared_clean;
406 stats[whichHeap].swappedOut += swapped_out;
408 stats[subHea
420 load_maps(int pid, stats_t* stats) argument
436 stats_t stats[_NUM_HEAP]; local
[all...]
H A Dcom_android_internal_net_NetworkStatsFactory.cpp96 static int readNetworkStatsDetail(JNIEnv* env, jclass clazz, jobject stats, argument
226 bool grow = size > env->GetIntField(stats, gNetworkStatsClassInfo.capacity);
228 ScopedLocalRef<jobjectArray> iface(env, get_string_array(env, stats,
231 ScopedIntArrayRW uid(env, get_int_array(env, stats,
234 ScopedIntArrayRW set(env, get_int_array(env, stats,
237 ScopedIntArrayRW tag(env, get_int_array(env, stats,
240 ScopedLongArrayRW rxBytes(env, get_long_array(env, stats,
243 ScopedLongArrayRW rxPackets(env, get_long_array(env, stats,
246 ScopedLongArrayRW txBytes(env, get_long_array(env, stats,
249 ScopedLongArrayRW txPackets(env, get_long_array(env, stats,
[all...]
/frameworks/base/core/tests/coretests/src/android/net/
H A DNetworkStatsHistoryTest.java55 private NetworkStatsHistory stats; field in class:NetworkStatsHistoryTest
60 if (stats != null) {
61 assertConsistent(stats);
93 stats = new NetworkStatsHistory(BUCKET_SIZE);
96 stats.recordData(TEST_START, TEST_START + SECOND_IN_MILLIS,
99 assertEquals(1, stats.size());
100 assertValues(stats, 0, SECOND_IN_MILLIS, 1024L, 10L, 2048L, 20L, 2L);
105 stats = new NetworkStatsHistory(bucketDuration);
109 stats.recordData(recordStart, recordStart + bucketDuration,
112 assertEquals(2, stats
488 assertIndexBeforeAfter( NetworkStatsHistory stats, int before, int after, long time) argument
502 assertConsistent(NetworkStatsHistory stats) argument
513 assertValues( NetworkStatsHistory stats, int index, long rxBytes, long txBytes) argument
520 assertValues( NetworkStatsHistory stats, long start, long end, long rxBytes, long txBytes) argument
527 assertValues(NetworkStatsHistory stats, int index, long activeTime, long rxBytes, long rxPackets, long txBytes, long txPackets, long operations) argument
538 assertFullValues(NetworkStatsHistory stats, long activeTime, long rxBytes, long rxPackets, long txBytes, long txPackets, long operations) argument
544 assertValues(NetworkStatsHistory stats, long start, long end, long activeTime, long rxBytes, long rxPackets, long txBytes, long txPackets, long operations) argument
[all...]
H A DNetworkStatsTest.java43 final NetworkStats stats = new NetworkStats(TEST_START, 3)
48 assertEquals(2, stats.findIndex(TEST_IFACE, 102, SET_DEFAULT, TAG_NONE));
49 assertEquals(2, stats.findIndex(TEST_IFACE, 102, SET_DEFAULT, TAG_NONE));
50 assertEquals(0, stats.findIndex(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE));
51 assertEquals(-1, stats.findIndex(TEST_IFACE, 6, SET_DEFAULT, TAG_NONE));
55 final NetworkStats stats = new NetworkStats(TEST_START, 3)
64 for (int hint = 0; hint < stats.size(); hint++) {
65 assertEquals(0, stats.findIndexHinted(TEST_IFACE, 100, SET_DEFAULT, TAG_NONE, hint));
66 assertEquals(1, stats.findIndexHinted(TEST_IFACE, 101, SET_DEFAULT, TAG_NONE, hint));
67 assertEquals(2, stats
323 assertValues(NetworkStats stats, int index, String iface, int uid, int set, int tag, long rxBytes, long rxPackets, long txBytes, long txPackets, long operations) argument
[all...]
/frameworks/base/core/java/android/content/
H A DSyncResult.java91 public final SyncStats stats; field in class:SyncResult
135 this.stats = new SyncStats();
147 stats = new SyncStats(parcel);
166 return stats.numParseExceptions > 0
167 || stats.numConflictDetectedExceptions > 0
168 || stats.numAuthExceptions > 0
187 return syncAlreadyInProgress || stats.numIoExceptions > 0;
204 return ((stats.numDeletes > 0) && !tooManyDeletions)
205 || stats.numInserts > 0
206 || stats
[all...]
/frameworks/base/wifi/java/android/net/wifi/
H A DWifiConnectionStatistics.java28 * Wifi Connection Statistics: gather various stats regarding WiFi connections,
64 WifiNetworkConnectionStatistics stats;
68 stats = untrustedNetworkHistory.get(SSID);
69 if (stats != null){
70 stats.numConnection = connection + stats.numConnection;
71 stats.numUsage = usage + stats.numUsage;
74 stats = new WifiNetworkConnectionStatistics(connection, usage);
76 if (stats !
[all...]
H A DWifiLinkLayerStats.java196 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/tests/coretests/src/com/android/internal/net/
H A DNetworkStatsFactoryTest.java73 stageFile(R.raw.xt_qtaguid_typical, new File(mTestProc, "net/xt_qtaguid/stats"));
75 final NetworkStats stats = mFactory.readNetworkStatsDetail();
76 assertEquals(70, stats.size());
77 assertStatsEntry(stats, "wlan0", 0, SET_DEFAULT, 0x0, 18621L, 2898L);
78 assertStatsEntry(stats, "wlan0", 10011, SET_DEFAULT, 0x0, 35777L, 5718L);
79 assertStatsEntry(stats, "wlan0", 10021, SET_DEFAULT, 0x7fffff01, 562386L, 49228L);
80 assertStatsEntry(stats, "rmnet1", 10021, SET_DEFAULT, 0x30100000, 219110L, 227423L);
81 assertStatsEntry(stats, "rmnet2", 10001, SET_DEFAULT, 0x0, 1125899906842624L, 984L);
99 stageFile(R.raw.xt_qtaguid_typical, new File(mTestProc, "net/xt_qtaguid/stats"));
101 final NetworkStats stats
157 assertStatsEntry(NetworkStats stats, String iface, int uid, int set, int tag, long rxBytes, long txBytes) argument
165 assertStatsEntry(NetworkStats stats, String iface, int uid, int set, int tag, long rxBytes, long rxPackets, long txBytes, long txPackets) argument
[all...]
/frameworks/base/core/java/android/database/sqlite/
H A DSQLiteDebug.java32 private static native void nativeGetPagerStats(PagerStats stats); argument
133 /** statement cache stats: hits/misses/cachesize */
147 * return all pager and database stats for the current process.
151 PagerStats stats = new PagerStats();
152 nativeGetPagerStats(stats);
153 stats.dbStats = SQLiteDatabase.getDbStats();
154 return stats;
/frameworks/base/services/tests/servicestests/src/com/android/server/location/
H A DLocationRequestStatisticsTest.java39 PackageStatistics stats = mStatistics.statistics.values().iterator().next();
40 verifyStatisticsTimes(stats);
41 assertEquals(INTERVAL1, stats.getFastestIntervalMs());
42 assertEquals(INTERVAL1, stats.getSlowestIntervalMs());
43 assertTrue(stats.isActive());
58 PackageStatistics stats = mStatistics.statistics.values().iterator().next();
59 verifyStatisticsTimes(stats);
60 assertEquals(INTERVAL1, stats.getFastestIntervalMs());
61 assertEquals(INTERVAL1, stats.getSlowestIntervalMs());
62 assertTrue(stats
168 verifyStatisticsTimes(PackageStatistics stats) argument
[all...]
/frameworks/base/core/java/com/android/internal/net/
H A DNetworkStatsFactory.java57 /** Path to {@code /proc/net/xt_qtaguid/stats}. */
81 mStatsXtUid = new File(procRoot, "net/xt_qtaguid/stats");
90 * @throws IllegalStateException when problem parsing stats.
95 final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 6);
124 stats.addValues(entry);
128 throw new ProtocolException("problem parsing stats", e);
130 throw new ProtocolException("problem parsing stats", e);
135 return stats;
143 * @throws IllegalStateException when problem parsing stats.
151 final NetworkStats stats
343 nativeReadNetworkStatsDetail( NetworkStats stats, String path, int limitUid, String[] limitIfaces, int limitTag) argument
[all...]
/frameworks/base/services/usage/java/com/android/server/usage/
H A DUsageStatsXmlV1.java67 final UsageStats stats = statsOut.getOrCreateUsageStats(pkg);
70 stats.mLastTimeUsed = statsOut.beginTime + XmlUtils.readLongAttribute(
73 stats.mTotalTimeInForeground = XmlUtils.readLongAttribute(parser, TOTAL_TIME_ACTIVE_ATTR);
74 stats.mLastEvent = XmlUtils.readIntAttribute(parser, LAST_EVENT_ATTR);
121 private static void writeUsageStats(XmlSerializer xml, final IntervalStats stats, argument
127 usageStats.mLastTimeUsed - stats.beginTime);
136 private static void writeConfigStats(XmlSerializer xml, final IntervalStats stats, argument
142 configStats.mLastTimeActive - stats.beginTime);
156 private static void writeEvent(XmlSerializer xml, final IntervalStats stats, argument
161 XmlUtils.writeLongAttribute(xml, TIME_ATTR, event.mTimeStamp - stats
229 write(XmlSerializer xml, IntervalStats stats) argument
[all...]
H A DUserUsageStatsService.java94 Slog.w(TAG, mLogPrefix + "Some stats have no latest available");
100 // generate new stats for each bucket.
166 for (IntervalStats stats : mCurrentStats) {
168 stats.updateConfigurationStats(newFullConfig, event.mTimeStamp);
170 stats.update(event.mPackage, event.mTimeStamp, event.mEventType);
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, boolea
485 printIntervalStats(IndentingPrintWriter pw, IntervalStats stats, boolean prettyDates) argument
[all...]
H A DUsageStatsDatabase.java64 * Initialize any directories required and index what stats are available.
101 boolean checkin(IntervalStats stats); argument
134 IntervalStats stats = new IntervalStats();
136 UsageStatsXml.read(files.valueAt(i), stats);
137 if (!checkinAction.checkin(stats)) {
146 // We have successfully checked-in the stats, so rename the files so that they
222 Slog.i(TAG, "Deleting all usage stats files");
272 * Get the latest stats that exist for this interval type.
287 IntervalStats stats = new IntervalStats();
288 UsageStatsXml.read(f, stats);
331 combine(IntervalStats stats, boolean mutable, List<T> accumulatedResult) argument
475 putUsageStats(int intervalType, IntervalStats stats) argument
[all...]
/frameworks/base/services/core/java/com/android/server/location/
H A DLocationRequestStatistics.java29 PackageStatistics stats = statistics.get(key);
30 if (stats == null) {
31 stats = new PackageStatistics();
32 statistics.put(key, stats);
34 stats.startRequesting(intervalMs);
45 PackageStatistics stats = statistics.get(key);
46 if (stats != null) {
47 stats.stopRequesting();
/frameworks/base/packages/SystemUI/src/com/android/systemui/
H A DLoadAverageService.java182 final CpuTracker stats = mStats;
183 final int userTime = stats.getLastUserTime();
184 final int systemTime = stats.getLastSystemTime();
185 final int iowaitTime = stats.getLastIoWaitTime();
186 final int irqTime = stats.getLastIrqTime();
187 final int softIrqTime = stats.getLastSoftIrqTime();
188 final int idleTime = stats.getLastIdleTime();
217 canvas.drawText(stats.mLoadText, RIGHT-paddingRight-stats.mLoadWidth-1,
219 canvas.drawText(stats
[all...]
/frameworks/base/packages/FusedLocation/src/com/android/location/fused/
H A DFusionEngine.java132 ProviderStats stats = mStats.get(name);
134 if (stats.available) {
135 if (!stats.requested) {
136 stats.requestTime = SystemClock.elapsedRealtime();
137 stats.requested = true;
138 stats.minTime = minTime;
140 } else if (stats.minTime != minTime) {
141 stats.minTime = minTime;
148 ProviderStats stats = mStats.get(name);
150 if (stats
[all...]
/frameworks/base/services/core/java/com/android/server/notification/
H A DNotificationUsageStats.java40 * <p>This class receives signals from NoMan and keeps running stats of
49 // WARNING: Aggregated stats can grow unboundedly with pkg+id+tag.
68 notification.stats = new SingleNotificationStats();
69 notification.stats.posttimeElapsedMs = SystemClock.elapsedRealtime();
70 for (AggregatedStats stats : getAggregatedStatsLocked(notification)) {
71 stats.numPostedByApp++;
82 notification.stats = old.stats;
83 for (AggregatedStats stats : getAggregatedStatsLocked(notification)) {
84 stats
[all...]
/frameworks/base/core/tests/benchmarks/src/com/android/internal/net/
H A DNetworkStatsFactoryBenchmark.java29 // TODO: consider staging stats file with different number of rows
33 mStats = new File("/proc/net/xt_qtaguid/stats");
49 final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 0);
51 stats, mStats.getAbsolutePath(), NetworkStats.UID_ALL);
/frameworks/base/services/core/java/com/android/server/am/
H A DBackupRecord.java31 final BatteryStatsImpl.Uid.Pkg.Serv stats; field in class:BackupRecord
41 stats = _agentStats;
/frameworks/base/tests/DataIdleTest/src/com/android/tests/dataidle/
H A DDataIdleTest.java70 * Helper method that fetches all the network stats available and reports it
79 final NetworkStats stats = session.getSummaryForAllUid(
81 reportStats(stats);
83 Log.w(LOG_TAG, "Failed to fetch network stats.");
90 * Print network data usage stats to instrumentation out
91 * @param stats {@link NetworkorStats} to print
93 void reportStats(NetworkStats stats) { argument
99 for (int i = 0; i < stats.size(); ++i) {
101 Entry statsEntry = stats.getValues(i, null);

Completed in 704 milliseconds

123