Home
last modified time | relevance | path

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

12345678

/packages/apps/Settings/src/com/android/settings/applications/
DAppStateNotificationBridge.java85 NotificationsSentState stats = in loadAllExtraInfo() local
87 if (stats == null) { in loadAllExtraInfo()
88 stats = new NotificationsSentState(); in loadAllExtraInfo()
90 calculateAvgSentCounts(stats); in loadAllExtraInfo()
91 addBlockStatus(entry, stats); in loadAllExtraInfo()
92 entry.extraInfo = stats; in loadAllExtraInfo()
98 NotificationsSentState stats = getAggregatedUsageEvents( in updateExtraInfo() local
100 calculateAvgSentCounts(stats); in updateExtraInfo()
101 addBlockStatus(entry, stats); in updateExtraInfo()
102 entry.extraInfo = stats; in updateExtraInfo()
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/applications/
DAppStateNotificationBridge.java85 NotificationsSentState stats = in loadAllExtraInfo() local
87 calculateAvgSentCounts(stats); in loadAllExtraInfo()
88 addBlockStatus(entry, stats); in loadAllExtraInfo()
89 entry.extraInfo = stats; in loadAllExtraInfo()
95 NotificationsSentState stats = getAggregatedUsageEvents( in updateExtraInfo() local
97 calculateAvgSentCounts(stats); in updateExtraInfo()
98 addBlockStatus(entry, stats); in updateExtraInfo()
99 entry.extraInfo = stats; in updateExtraInfo()
120 private void addBlockStatus(AppEntry entry, NotificationsSentState stats) { in addBlockStatus() argument
121 if (stats != null) { in addBlockStatus()
[all …]
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/storage/
DStorageApplicationActionButtonsPreferenceControllerTest.java190 StorageStats stats = new StorageStats(); in handleClearCacheClick_disallowedBySystem_shouldNotDeleteApplicationCache() local
191 stats.codeBytes = 100; in handleClearCacheClick_disallowedBySystem_shouldNotDeleteApplicationCache()
192 stats.dataBytes = 50; in handleClearCacheClick_disallowedBySystem_shouldNotDeleteApplicationCache()
193 stats.cacheBytes = 0; in handleClearCacheClick_disallowedBySystem_shouldNotDeleteApplicationCache()
195 new StorageStatsSource.AppStorageStatsImpl(stats); in handleClearCacheClick_disallowedBySystem_shouldNotDeleteApplicationCache()
214 StorageStats stats = new StorageStats(); in handleClearCacheClick_allowedBySystem_shouldNotDeleteApplicationCache() local
215 stats.codeBytes = 100; in handleClearCacheClick_allowedBySystem_shouldNotDeleteApplicationCache()
216 stats.dataBytes = 50; in handleClearCacheClick_allowedBySystem_shouldNotDeleteApplicationCache()
217 stats.cacheBytes = 0; in handleClearCacheClick_allowedBySystem_shouldNotDeleteApplicationCache()
219 new StorageStatsSource.AppStorageStatsImpl(stats); in handleClearCacheClick_allowedBySystem_shouldNotDeleteApplicationCache()
[all …]
/packages/apps/StorageManager/robotests/src/com/android/storagemanager/deletionhelper/
DAppStateUsageStatsBridgeTest.java103 UsageStatsState stats = (UsageStatsState) app.extraInfo; in test_appInstalledSameDayNeverUsed_isInvalid() local
106 assertThat(stats.daysSinceFirstInstall).isEqualTo(0); in test_appInstalledSameDayNeverUsed_isInvalid()
107 assertThat(stats.daysSinceLastUse).isEqualTo(AppStateUsageStatsBridge.NEVER_USED); in test_appInstalledSameDayNeverUsed_isInvalid()
117 UsageStatsState stats = (UsageStatsState) app.extraInfo; in test_noThresholdFilter_appInstalledSameDayNeverUsed_isValid() local
120 assertThat(stats.daysSinceFirstInstall).isEqualTo(0); in test_noThresholdFilter_appInstalledSameDayNeverUsed_isValid()
121 assertThat(stats.daysSinceLastUse).isEqualTo(AppStateUsageStatsBridge.NEVER_USED); in test_noThresholdFilter_appInstalledSameDayNeverUsed_isValid()
131 UsageStatsState stats = (UsageStatsState) app.extraInfo; in test_unusedApp_isValid() local
134 assertThat(stats.daysSinceFirstInstall).isEqualTo(90); in test_unusedApp_isValid()
135 assertThat(stats.daysSinceLastUse).isEqualTo(AppStateUsageStatsBridge.NEVER_USED); in test_unusedApp_isValid()
145 UsageStatsState stats = (UsageStatsState) app.extraInfo; in test_noThresholdFilter_unusedApp_isValid() local
[all …]
/packages/modules/DnsResolver/
Dres_stats.cpp43 void _res_stats_clear_samples(res_stats* stats) { in _res_stats_clear_samples() argument
44 stats->sample_count = stats->sample_next = 0; in _res_stats_clear_samples()
48 void android_net_res_stats_aggregate(res_stats* stats, int* successes, int* errors, int* timeouts, in android_net_res_stats_aggregate() argument
57 for (int i = 0; i < stats->sample_count; ++i) { in android_net_res_stats_aggregate()
65 switch (stats->samples[i].rcode) { in android_net_res_stats_aggregate()
70 rtt_sum += stats->samples[i].rtt; in android_net_res_stats_aggregate()
98 if (stats->sample_count > 0) { in android_net_res_stats_aggregate()
99 if (stats->sample_next > 0) { in android_net_res_stats_aggregate()
100 last = stats->samples[stats->sample_next - 1].at; in android_net_res_stats_aggregate()
102 last = stats->samples[stats->sample_count - 1].at; in android_net_res_stats_aggregate()
[all …]
DResolverStats.h58 static void encodeAll(const std::vector<ResolverStats>& stats, std::vector<int32_t>* out);
61 static bool decodeAll(const std::vector<int32_t>& in, std::vector<ResolverStats>* stats);
93 inline void ResolverStats::encodeAll(const std::vector<ResolverStats>& stats, in encodeAll() argument
95 for (const auto& s : stats) { in encodeAll()
102 std::vector<ResolverStats>* stats) { in decodeAll() argument
107 stats->resize(size / STATS_COUNT); in decodeAll()
109 for (auto& s : *stats) { in decodeAll()
DResolverController.cpp96 res_params* params, std::vector<android::net::ResolverStats>* stats, in getDnsInfo() argument
119 stats->clear(); in getDnsInfo()
143 stats->resize(nscount); in getDnsInfo()
157 android::net::ResolverStats& cur_stats = (*stats)[i]; in getDnsInfo()
242 std::vector<int32_t>* params, std::vector<int32_t>* stats, in getResolverInfo() argument
255 ResolverStats::encodeAll(res_stats, stats); in getResolverInfo()
298 std::vector<ResolverStats> stats; in dump() local
301 int rv = getDnsInfo(netId, &servers, &domains, &params, &stats, in dump()
317 if (i < stats.size()) { in dump()
318 const ResolverStats& s = stats[i]; in dump()
/packages/services/Car/car-lib/src/android/car/storagemonitoring/
DIoStats.java56 public IoStats(List<IoStatsEntry> stats, long timestamp) { in IoStats() argument
57 mStats = stats; in IoStats()
122 for (IoStatsEntry stats : getStats()) { in getUserIdStats()
123 if (stats.uid == uid) { in getUserIdStats()
124 return stats; in getUserIdStats()
142 for (IoStatsEntry stats : getStats()) { in getForegroundTotals()
143 bytesRead += stats.foreground.bytesRead; in getForegroundTotals()
144 bytesWritten += stats.foreground.bytesWritten; in getForegroundTotals()
145 bytesReadFromStorage += stats.foreground.bytesReadFromStorage; in getForegroundTotals()
146 bytesWrittenToStorage += stats.foreground.bytesWrittenToStorage; in getForegroundTotals()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/
DRecentAppStatsMixinTest.java94 final List<UsageStats> stats = new ArrayList<>(); in loadDisplayableRecentApps_oneValidRecentAppSet_shouldHaveOneRecentApp() local
98 stats.add(stat1); in loadDisplayableRecentApps_oneValidRecentAppSet_shouldHaveOneRecentApp()
105 .thenReturn(stats); in loadDisplayableRecentApps_oneValidRecentAppSet_shouldHaveOneRecentApp()
115 final List<UsageStats> stats = new ArrayList<>(); in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps() local
121 stats.add(stat1); in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps()
125 stats.add(stat2); in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps()
129 stats.add(stat3); in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps()
140 .thenReturn(stats); in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps()
150 final List<UsageStats> stats = new ArrayList<>(); in loadDisplayableRecentApps_oneValidAndTwoInvalidSet_shouldHaveOneRecentApp() local
156 stats.add(stat1); in loadDisplayableRecentApps_oneValidAndTwoInvalidSet_shouldHaveOneRecentApp()
[all …]
DAppStorageSettingsTest.java101 final AppStorageStats stats = mock(AppStorageStats.class); in updateUiWithSize_hasDataAndCache_shouldEnableClearButtons() local
102 when(stats.getCacheBytes()).thenReturn(5000L); in updateUiWithSize_hasDataAndCache_shouldEnableClearButtons()
103 when(stats.getDataBytes()).thenReturn(10000L); in updateUiWithSize_hasDataAndCache_shouldEnableClearButtons()
109 mSettings.updateUiWithSize(stats); in updateUiWithSize_hasDataAndCache_shouldEnableClearButtons()
124 final AppStorageStats stats = mock(AppStorageStats.class); in updateUiWithSize_mainlineModule_shouldDisableClearButtons() local
125 when(stats.getCacheBytes()).thenReturn(5000L); in updateUiWithSize_mainlineModule_shouldDisableClearButtons()
126 when(stats.getDataBytes()).thenReturn(10000L); in updateUiWithSize_mainlineModule_shouldDisableClearButtons()
132 mSettings.updateUiWithSize(stats); in updateUiWithSize_mainlineModule_shouldDisableClearButtons()
DFetchPackageStorageAsyncLoaderTest.java61 AppStorageStats stats = mock(AppStorageStats.class); in worksForValidPackageNameAndUid() local
62 when(stats.getCodeBytes()).thenReturn(1L); in worksForValidPackageNameAndUid()
63 when(stats.getDataBytes()).thenReturn(2L); in worksForValidPackageNameAndUid()
64 when(stats.getCacheBytes()).thenReturn(3L); in worksForValidPackageNameAndUid()
67 .thenReturn(stats); in worksForValidPackageNameAndUid()
73 assertThat(task.loadInBackground()).isEqualTo(stats); in worksForValidPackageNameAndUid()
/packages/apps/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/device/apps/
DRecentAppsPreferenceControllerTest.java140 final List<UsageStats> stats = new ArrayList<>(); in display_showRecents() local
146 stats.add(stat1); in display_showRecents()
150 stats.add(stat2); in display_showRecents()
154 stats.add(stat3); in display_showRecents()
166 .thenReturn(stats); in display_showRecents()
179 final List<UsageStats> stats = new ArrayList<>(); in display_showRecentsWithInstantApp() local
183 stats.add(stat1); in display_showRecentsWithInstantApp()
189 stats.add(stat2); in display_showRecentsWithInstantApp()
204 .thenReturn(stats); in display_showRecentsWithInstantApp()
221 final List<UsageStats> stats = new ArrayList<>(); in display_showRecentsWithNullAppEntryOrInfo() local
[all …]
/packages/apps/Settings/src/com/android/settings/fuelgauge/
DBatteryInfo.java169 final BatteryStats stats; in getBatteryInfo() local
175 stats = localStatsHelper.getStats(); in getBatteryInfo()
177 stats = statsHelper.getStats(); in getBatteryInfo()
200 return BatteryInfo.getBatteryInfo(context, batteryBroadcast, stats, in getBatteryInfo()
205 ? stats.computeBatteryTimeRemaining(elapsedRealtimeUs) : 0; in getBatteryInfo()
211 return BatteryInfo.getBatteryInfo(context, batteryBroadcast, stats, in getBatteryInfo()
217 BatteryStats stats, long elapsedRealtimeUs, boolean shortString) { in getBatteryInfoOld() argument
219 PowerUtil.convertUsToMs(stats.computeBatteryTimeRemaining(elapsedRealtimeUs)), in getBatteryInfoOld()
222 return getBatteryInfo(context, batteryBroadcast, stats, estimate, elapsedRealtimeUs, in getBatteryInfoOld()
228 BatteryStats stats, Estimate estimate, long elapsedRealtimeUs, boolean shortString) { in getBatteryInfo() argument
[all …]
DBatteryAppListPreferenceController.java179 final BatteryStats stats = statsHelper.getStats(); in refreshAppListGroup() local
183 : stats != null ? stats.getDischargeAmount(STATS_TYPE) : 0; in refreshAppListGroup()
416 ArrayList<BatterySipper> stats = new ArrayList<>(); in getFakeStats() local
422 stats.add(new BatterySipper(type, null, use)); in getFakeStats()
426 stats.add(new BatterySipper(DrainType.APP, in getFakeStats()
429 stats.add(new BatterySipper(DrainType.APP, in getFakeStats()
436 stats.add(sipper); in getFakeStats()
441 stats.add(sipper); in getFakeStats()
445 stats.add(sipper); in getFakeStats()
447 return stats; in getFakeStats()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/
DBatteryInfo.java166 final BatteryStats stats; in getBatteryInfo() local
172 stats = localStatsHelper.getStats(); in getBatteryInfo()
174 stats = statsHelper.getStats(); in getBatteryInfo()
196 return BatteryInfo.getBatteryInfo(context, batteryBroadcast, stats, in getBatteryInfo()
201 ? stats.computeBatteryTimeRemaining(elapsedRealtimeUs) : 0; in getBatteryInfo()
207 return BatteryInfo.getBatteryInfo(context, batteryBroadcast, stats, in getBatteryInfo()
213 BatteryStats stats, long elapsedRealtimeUs, boolean shortString) { in getBatteryInfoOld() argument
215 PowerUtil.convertUsToMs(stats.computeBatteryTimeRemaining(elapsedRealtimeUs)), in getBatteryInfoOld()
218 return getBatteryInfo(context, batteryBroadcast, stats, estimate, elapsedRealtimeUs, in getBatteryInfoOld()
224 BatteryStats stats, Estimate estimate, long elapsedRealtimeUs, boolean shortString) { in getBatteryInfo() argument
[all …]
DBatteryAppListPreferenceController.java180 final BatteryStats stats = statsHelper.getStats(); in refreshAppListGroup() local
184 : stats != null ? stats.getDischargeAmount(STATS_TYPE) : 0; in refreshAppListGroup()
409 ArrayList<BatterySipper> stats = new ArrayList<>(); in getFakeStats() local
415 stats.add(new BatterySipper(type, null, use)); in getFakeStats()
419 stats.add(new BatterySipper(DrainType.APP, in getFakeStats()
422 stats.add(new BatterySipper(DrainType.APP, in getFakeStats()
429 stats.add(sipper); in getFakeStats()
434 stats.add(sipper); in getFakeStats()
438 stats.add(sipper); in getFakeStats()
440 return stats; in getFakeStats()
/packages/modules/NetworkStack/src/com/android/networkstack/metrics/
DDataStallStatsUtils.java64 public static void write(@NonNull final DataStallDetectionStats stats, in write() argument
68 Log.d(TAG, "write: " + stats + " with result: " + validationResult in write()
69 + ", dns: " + HexDump.toHexString(stats.mDns)); in write()
72 stats.mEvaluationType, in write()
74 stats.mNetworkType, in write()
75 stats.mWifiInfo, in write()
76 stats.mCellularInfo, in write()
77 stats.mDns, in write()
78 stats.mTcpFailRate, in write()
79 stats.mTcpSentSinceLastRecv); in write()
Dstats.proto22 import "frameworks/base/core/proto/android/stats/connectivity/network_stack.proto";
40 optional .android.stats.connectivity.ProbeType probe_type = 1;
46 optional .android.stats.connectivity.ProbeResult probe_result = 3;
64 repeated .android.stats.connectivity.DhcpFeature used_features = 1;
78 repeated .android.stats.connectivity.DhcpErrorCode error_code = 5;
81 optional .android.stats.connectivity.HostnameTransResult ht_result = 6;
91 optional .android.stats.connectivity.TransportType transport_type = 1;
103 optional .android.stats.connectivity.DisconnectCode disconnect_code = 5;
119 optional .android.stats.connectivity.TransportType transport_type = 1;
128 optional .android.stats.connectivity.DhcpErrorCode error_code = 4;
[all …]
DNetworkValidationMetrics.java35 import android.stats.connectivity.ProbeResult;
36 import android.stats.connectivity.ProbeType;
37 import android.stats.connectivity.TransportType;
38 import android.stats.connectivity.ValidationResult;
241 final NetworkValidationReported stats = mStatsBuilder.build(); in maybeStopCollectionAndSend() local
242 final byte[] probeEvents = stats.getProbeEvents().toByteArray(); in maybeStopCollectionAndSend()
245 stats.getTransportType().getNumber(), in maybeStopCollectionAndSend()
247 stats.getValidationResult().getNumber(), in maybeStopCollectionAndSend()
248 stats.getLatencyMicros(), in maybeStopCollectionAndSend()
249 stats.getValidationIndex(), in maybeStopCollectionAndSend()
[all …]
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/storage/
DAppsStorageStatsManagerTest.java83 StorageStats stats = new StorageStats(); in callback_onLoadFinished_listenerOnDataLoadedCalled() local
85 new StorageStatsSource.AppStorageStatsImpl(stats); in callback_onLoadFinished_listenerOnDataLoadedCalled()
98 StorageStats stats = new StorageStats(); in callback_unregisterListener_onlyOneListenerOnDataLoadedCalled() local
100 new StorageStatsSource.AppStorageStatsImpl(stats); in callback_unregisterListener_onlyOneListenerOnDataLoadedCalled()
113 StorageStats stats = new StorageStats(); in callback_notLoaded_listenerOnDataLoadedCalled() local
115 new StorageStatsSource.AppStorageStatsImpl(stats); in callback_notLoaded_listenerOnDataLoadedCalled()
130 StorageStats stats = new StorageStats(); in callback_cachedCleared_listenerOnDataLoadedCalled() local
132 new StorageStatsSource.AppStorageStatsImpl(stats); in callback_cachedCleared_listenerOnDataLoadedCalled()
147 StorageStats stats = new StorageStats(); in callback_userDataCleared_listenerOnDataLoadedCalled() local
149 new StorageStatsSource.AppStorageStatsImpl(stats); in callback_userDataCleared_listenerOnDataLoadedCalled()
/packages/services/Car/watchdog/server/src/
DIoPerfCollection.cpp119 for (const auto& stats : processStats) { in getUidProcessStats() local
120 if (stats.uid < 0) { in getUidProcessStats()
123 uint32_t uid = static_cast<uint32_t>(stats.uid); in getUidProcessStats()
138 curUidProcessStats.majorFaults += stats.process.majorFaults; in getUidProcessStats()
139 curUidProcessStats.totalTasksCnt += stats.threads.size(); in getUidProcessStats()
143 for (const auto& threadStat : stats.threads) { in getUidProcessStats()
153 .comm = stats.process.comm, in getUidProcessStats()
162 if (it->count < stats.process.majorFaults) { in getUidProcessStats()
166 .comm = stats.process.comm, in getUidProcessStats()
167 .count = stats.process.majorFaults, in getUidProcessStats()
[all …]
/packages/modules/NetworkStack/tests/unit/src/com/android/networkstack/metrics/
DNetworkValidationMetricsTest.java34 import android.stats.connectivity.ProbeResult;
35 import android.stats.connectivity.ProbeType;
36 import android.stats.connectivity.TransportType;
37 import android.stats.connectivity.ValidationResult;
148 final NetworkValidationReported stats = metrics.maybeStopCollectionAndSend(); in testNetworkValidationMetrics_VerifyConsecutiveProbeFailure() local
151 final ProbeEvents probeEvents = stats.getProbeEvents(); in testNetworkValidationMetrics_VerifyConsecutiveProbeFailure()
190 final NetworkValidationReported stats = metrics.maybeStopCollectionAndSend(); in testNetworkValidationMetrics_VerifyCollectMetrics() local
193 assertEquals(TransportType.TT_WIFI, stats.getTransportType()); in testNetworkValidationMetrics_VerifyCollectMetrics()
196 assertEquals(validationIndex, stats.getValidationIndex()); in testNetworkValidationMetrics_VerifyCollectMetrics()
199 final ProbeEvents probeEvents = stats.getProbeEvents(); in testNetworkValidationMetrics_VerifyCollectMetrics()
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/notification/
DNotificationBackend.java391 NotificationsSentState stats = appRow.sentByChannel.get(channelId); in recordAggregatedUsageEvents() local
392 if (stats == null) { in recordAggregatedUsageEvents()
393 stats = new NotificationsSentState(); in recordAggregatedUsageEvents()
394 appRow.sentByChannel.put(channelId, stats); in recordAggregatedUsageEvents()
396 if (event.getTimeStamp() > stats.lastSent) { in recordAggregatedUsageEvents()
397 stats.lastSent = event.getTimeStamp(); in recordAggregatedUsageEvents()
400 stats.sentCount++; in recordAggregatedUsageEvents()
402 calculateAvgSentCounts(stats); in recordAggregatedUsageEvents()
430 private void calculateAvgSentCounts(NotificationsSentState stats) { in calculateAvgSentCounts() argument
431 if (stats != null) { in calculateAvgSentCounts()
[all …]
/packages/services/Car/evs/manager/1.1/
DAndroid.bp25 "stats/CameraUsageStats.cpp",
26 "stats/LooperWrapper.cpp",
27 "stats/StatsCollector.cpp",
55 "stats/",
78 "stats/CameraUsageStats.cpp",
79 "stats/LooperWrapper.cpp",
80 "stats/StatsCollector.cpp",
/packages/apps/Settings/src/com/android/settings/notification/
DNotificationBackend.java471 NotificationsSentState stats = appRow.sentByChannel.get(channelId); in recordAggregatedUsageEvents() local
472 if (stats == null) { in recordAggregatedUsageEvents()
473 stats = new NotificationsSentState(); in recordAggregatedUsageEvents()
474 appRow.sentByChannel.put(channelId, stats); in recordAggregatedUsageEvents()
476 if (event.getTimeStamp() > stats.lastSent) { in recordAggregatedUsageEvents()
477 stats.lastSent = event.getTimeStamp(); in recordAggregatedUsageEvents()
480 stats.sentCount++; in recordAggregatedUsageEvents()
482 calculateAvgSentCounts(stats); in recordAggregatedUsageEvents()
512 private void calculateAvgSentCounts(NotificationsSentState stats) { in calculateAvgSentCounts() argument
513 if (stats != null) { in calculateAvgSentCounts()
[all …]

12345678