Home
last modified time | relevance | path

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

1234567

/packages/apps/Settings/src/com/android/settings/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()
122 private void addBlockStatus(AppEntry entry, NotificationsSentState stats) { in addBlockStatus() argument
123 if (stats != null) { in addBlockStatus()
[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/robotests/src/com/android/car/settings/storage/
DAppStorageSettingsDetailsFragmentTest.java160 StorageStats stats = new StorageStats(); in handleClearCacheClick_disallowedBySystem_shouldNotDeleteApplicationCache() local
161 stats.codeBytes = 100; in handleClearCacheClick_disallowedBySystem_shouldNotDeleteApplicationCache()
162 stats.dataBytes = 50; in handleClearCacheClick_disallowedBySystem_shouldNotDeleteApplicationCache()
163 stats.cacheBytes = 0; in handleClearCacheClick_disallowedBySystem_shouldNotDeleteApplicationCache()
165 new StorageStatsSource.AppStorageStatsImpl(stats); in handleClearCacheClick_disallowedBySystem_shouldNotDeleteApplicationCache()
183 StorageStats stats = new StorageStats(); in handleClearCacheClick_allowedBySystem_shouldNotDeleteApplicationCache() local
184 stats.codeBytes = 100; in handleClearCacheClick_allowedBySystem_shouldNotDeleteApplicationCache()
185 stats.dataBytes = 50; in handleClearCacheClick_allowedBySystem_shouldNotDeleteApplicationCache()
186 stats.cacheBytes = 10; in handleClearCacheClick_allowedBySystem_shouldNotDeleteApplicationCache()
188 new StorageStatsSource.AppStorageStatsImpl(stats); in handleClearCacheClick_allowedBySystem_shouldNotDeleteApplicationCache()
[all …]
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/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()
117 for (IoStatsEntry stats : getStats()) { in getUserIdStats()
118 if (stats.uid == uid) { in getUserIdStats()
119 return stats; in getUserIdStats()
133 for (IoStatsEntry stats : getStats()) { in getForegroundTotals()
134 bytesRead += stats.foreground.bytesRead; in getForegroundTotals()
135 bytesWritten += stats.foreground.bytesWritten; in getForegroundTotals()
136 bytesReadFromStorage += stats.foreground.bytesReadFromStorage; in getForegroundTotals()
137 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 …]
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()
DRecentAppsPreferenceControllerTest.java127 final List<UsageStats> stats = new ArrayList<>(); in onReloadDataCompleted_threeValidRecentOpenAppsSet_setAppEntityThreeTime() local
133 stats.add(stat1); in onReloadDataCompleted_threeValidRecentOpenAppsSet_setAppEntityThreeTime()
137 stats.add(stat2); in onReloadDataCompleted_threeValidRecentOpenAppsSet_setAppEntityThreeTime()
141 stats.add(stat3); in onReloadDataCompleted_threeValidRecentOpenAppsSet_setAppEntityThreeTime()
150 mController.onReloadDataCompleted(stats); in onReloadDataCompleted_threeValidRecentOpenAppsSet_setAppEntityThreeTime()
160 final List<UsageStats> stats = new ArrayList<>(); in onReloadDataCompleted_noRecentOpenAppsSet_shouldHideRecentAppPreference() local
162 mController.onReloadDataCompleted(stats); in onReloadDataCompleted_noRecentOpenAppsSet_shouldHideRecentAppPreference()
/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.java168 final BatteryStats stats; in getBatteryInfo() local
174 stats = localStatsHelper.getStats(); in getBatteryInfo()
176 stats = statsHelper.getStats(); in getBatteryInfo()
199 return BatteryInfo.getBatteryInfo(context, batteryBroadcast, stats, in getBatteryInfo()
204 ? stats.computeBatteryTimeRemaining(elapsedRealtimeUs) : 0; in getBatteryInfo()
210 return BatteryInfo.getBatteryInfo(context, batteryBroadcast, stats, in getBatteryInfo()
216 BatteryStats stats, long elapsedRealtimeUs, boolean shortString) { in getBatteryInfoOld() argument
218 PowerUtil.convertUsToMs(stats.computeBatteryTimeRemaining(elapsedRealtimeUs)), in getBatteryInfoOld()
221 return getBatteryInfo(context, batteryBroadcast, stats, estimate, elapsedRealtimeUs, in getBatteryInfoOld()
227 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()
404 ArrayList<BatterySipper> stats = new ArrayList<>(); in getFakeStats() local
410 stats.add(new BatterySipper(type, null, use)); in getFakeStats()
414 stats.add(new BatterySipper(DrainType.APP, in getFakeStats()
417 stats.add(new BatterySipper(DrainType.APP, in getFakeStats()
424 stats.add(sipper); in getFakeStats()
429 stats.add(sipper); in getFakeStats()
433 stats.add(sipper); in getFakeStats()
435 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/ExtServices/tests/src/android/ext/services/notification/
DAssistantTest.java171 NotificationStats stats = new NotificationStats(); in dismissBadNotification() local
172 stats.setDismissalSurface(NotificationStats.DISMISSAL_SHADE); in dismissBadNotification()
173 stats.setSeen(); in dismissBadNotification()
175 sbn, mock(RankingMap.class), stats, NotificationListenerService.REASON_CANCEL); in dismissBadNotification()
222 NotificationStats stats = new NotificationStats(); in testGroupChildCanTriggerAdjustment() local
223 stats.setDismissalSurface(NotificationStats.DISMISSAL_SHADE); in testGroupChildCanTriggerAdjustment()
224 stats.setSeen(); in testGroupChildCanTriggerAdjustment()
227 sbn, mock(RankingMap.class), stats, NotificationListenerService.REASON_CANCEL); in testGroupChildCanTriggerAdjustment()
246 NotificationStats stats = new NotificationStats(); in testGroupSummaryCannotTriggerAdjustment() local
247 stats.setDismissalSurface(NotificationStats.DISMISSAL_SHADE); in testGroupSummaryCannotTriggerAdjustment()
[all …]
/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/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/notification/
DNotificationBackend.java377 NotificationsSentState stats = appRow.sentByChannel.get(channelId); in recordAggregatedUsageEvents() local
378 if (stats == null) { in recordAggregatedUsageEvents()
379 stats = new NotificationsSentState(); in recordAggregatedUsageEvents()
380 appRow.sentByChannel.put(channelId, stats); in recordAggregatedUsageEvents()
382 if (event.getTimeStamp() > stats.lastSent) { in recordAggregatedUsageEvents()
383 stats.lastSent = event.getTimeStamp(); in recordAggregatedUsageEvents()
386 stats.sentCount++; in recordAggregatedUsageEvents()
388 calculateAvgSentCounts(stats); in recordAggregatedUsageEvents()
416 private void calculateAvgSentCounts(NotificationsSentState stats) { in calculateAvgSentCounts() argument
417 if (stats != null) { in calculateAvgSentCounts()
[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/apps/Settings/src/com/android/settings/notification/
DNotificationBackend.java394 NotificationsSentState stats = appRow.sentByChannel.get(channelId); in recordAggregatedUsageEvents() local
395 if (stats == null) { in recordAggregatedUsageEvents()
396 stats = new NotificationsSentState(); in recordAggregatedUsageEvents()
397 appRow.sentByChannel.put(channelId, stats); in recordAggregatedUsageEvents()
399 if (event.getTimeStamp() > stats.lastSent) { in recordAggregatedUsageEvents()
400 stats.lastSent = event.getTimeStamp(); in recordAggregatedUsageEvents()
403 stats.sentCount++; in recordAggregatedUsageEvents()
405 calculateAvgSentCounts(stats); in recordAggregatedUsageEvents()
435 private void calculateAvgSentCounts(NotificationsSentState stats) { in calculateAvgSentCounts() argument
436 if (stats != null) { in calculateAvgSentCounts()
[all …]
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/logging/
DStatsLogCompatManager.java19 import static android.stats.launcher.nano.Launcher.ALLAPPS;
20 import static android.stats.launcher.nano.Launcher.HOME;
21 import static android.stats.launcher.nano.Launcher.LAUNCH_APP;
22 import static android.stats.launcher.nano.Launcher.LAUNCH_TASK;
23 import static android.stats.launcher.nano.Launcher.DISMISS_TASK;
24 import static android.stats.launcher.nano.Launcher.BACKGROUND;
25 import static android.stats.launcher.nano.Launcher.OVERVIEW;
29 import android.stats.launcher.nano.Launcher;
30 import android.stats.launcher.nano.LauncherExtension;
31 import android.stats.launcher.nano.LauncherTarget;

1234567