Home
last modified time | relevance | path

Searched refs:history (Results 1 – 25 of 81) sorted by relevance

1234

/packages/modules/Connectivity/tests/unit/java/android/net/
DNetworkStatsCollectionTest.java345 NetworkStatsHistory history; in testAugmentPlan() local
348 history = getHistory(emptyCollection, plan, TIME_A, TIME_C); in testAugmentPlan()
349 assertEquals(0L, history.getTotalBytes()); in testAugmentPlan()
352 history = getHistory(collection, plan, TIME_A, TIME_C); in testAugmentPlan()
354 assertEntry(100647, 197, 23649, 185, history.getValues(i++, null)); in testAugmentPlan()
355 assertEntry(100647, 196, 23648, 185, history.getValues(i++, null)); in testAugmentPlan()
356 assertEntry(18323, 76, 15032, 76, history.getValues(i++, null)); in testAugmentPlan()
357 assertEntry(18322, 75, 15031, 75, history.getValues(i++, null)); in testAugmentPlan()
358 assertEntry(527798, 761, 78570, 652, history.getValues(i++, null)); in testAugmentPlan()
359 assertEntry(527797, 760, 78570, 651, history.getValues(i++, null)); in testAugmentPlan()
[all …]
DNetworkStatsHistoryTest.java94 final NetworkStatsHistory history = new NetworkStatsHistory(in); in testReadOriginalVersion() local
95 assertEquals(15 * SECOND_IN_MILLIS, history.getBucketDuration()); in testReadOriginalVersion()
97 entry = history.getValues(0, entry); in testReadOriginalVersion()
101 entry = history.getValues(history.size() - 1, entry); in testReadOriginalVersion()
105 entry = history.getValues(Long.MIN_VALUE, Long.MAX_VALUE, entry); in testReadOriginalVersion()
387 final NetworkStatsHistory history = new NetworkStatsHistory( in testIgnoreFields() local
390 history.recordData(0, MINUTE_IN_MILLIS, in testIgnoreFields()
393 history.recordData(0, 2 * MINUTE_IN_MILLIS, in testIgnoreFields()
397 assertFullValues(history, UNKNOWN, 1026L, UNKNOWN, 2050L, UNKNOWN, UNKNOWN); in testIgnoreFields()
/packages/modules/Connectivity/staticlibs/testutils/devicetests/com/android/testutils/
DTestableNetworkStatsProviderCbBinder.kt41 private val history = ArrayTrackRecord<CallbackType>().ReadHead() constant in com.android.testutils.TestableNetworkStatsProviderCbBinder
44 history.add(CallbackType.NotifyStatsUpdated(token, ifaceStats, uidStats)) in notifyStatsUpdated()
48 history.add(CallbackType.NotifyWarningReached) in notifyWarningReached()
52 history.add(CallbackType.NotifyLimitReached) in notifyLimitReached()
57 history.add(CallbackType.NotifyWarningOrLimitReached) in notifyWarningOrLimitReached()
61 history.add(CallbackType.NotifyAlertReached) in notifyAlertReached()
65 history.add(CallbackType.Unregister) in unregister()
69 val event = history.poll(DEFAULT_TIMEOUT_MS) in expectNotifyStatsUpdated()
74 val event = history.poll(DEFAULT_TIMEOUT_MS)!! in expectNotifyStatsUpdated()
84 assertEquals(CallbackType.NotifyWarningReached, history.poll(DEFAULT_TIMEOUT_MS)) in expectNotifyWarningReached()
[all …]
DTestableNetworkAgent.kt71 val history = ArrayTrackRecord<CallbackEntry>().newReadHead() constant
102 history.add(OnBandwidthUpdateRequested) in onBandwidthUpdateRequested()
106 history.add(OnNetworkUnwanted) in onNetworkUnwanted()
110 history.add(OnAddKeepalivePacketFilter(slot, packet)) in onAddKeepalivePacketFilter()
114 history.add(OnRemoveKeepalivePacketFilter(slot)) in onRemoveKeepalivePacketFilter()
122 history.add(OnStartSocketKeepalive(slot, interval.seconds.toInt(), packet)) in onStartSocketKeepalive()
126 history.add(OnStopSocketKeepalive(slot)) in onStopSocketKeepalive()
130 history.add(OnSaveAcceptUnvalidated(accept)) in onSaveAcceptUnvalidated()
134 history.add(OnAutomaticReconnectDisabled) in onAutomaticReconnectDisabled()
138 history.add(OnSignalStrengthThresholdsUpdated(thresholds)) in onSignalStrengthThresholdsUpdated()
[all …]
DTestableNetworkStatsProvider.kt48 val history = ArrayTrackRecord<CallbackType>().newReadHead() constant in com.android.testutils.TestableNetworkStatsProvider
50 val mark get() = history.mark
54 history.add(CallbackType.OnRequestStatsUpdate(token)) in onRequestStatsUpdate()
59 history.add(CallbackType.OnSetWarningAndLimit(iface, warningBytes, limitBytes)) in onSetWarningAndLimit()
64 history.add(CallbackType.OnSetLimit(iface, quotaBytes)) in onSetLimit()
69 history.add(CallbackType.OnSetAlert(quotaBytes)) in onSetAlert()
73 val event = history.poll(timeout) in expectOnRequestStatsUpdate()
82 assertEquals(CallbackType.OnSetLimit(iface, quotaBytes), history.poll(timeout)) in expectOnSetLimit()
86 assertEquals(CallbackType.OnSetAlert(quotaBytes), history.poll(timeout)) in expectOnSetAlert()
90 history.poll(timeout) ?: fail("Did not receive callback after ${timeout}ms") in pollForNextCallback()
[all …]
DTestableNetworkStatsProviderBinder.kt36 private val history = ArrayTrackRecord<CallbackType>().ReadHead() constant
39 history.add(CallbackType.OnRequestStatsUpdate(token)) in onRequestStatsUpdate()
43 history.add(CallbackType.OnSetAlert(quotaBytes)) in onSetAlert()
47 history.add(CallbackType.OnSetWarningAndLimit(iface, warningBytes, limitBytes)) in onSetWarningAndLimit()
51 assertEquals(CallbackType.OnRequestStatsUpdate(token), history.poll(DEFAULT_TIMEOUT_MS)) in expectOnRequestStatsUpdate()
56 history.poll(DEFAULT_TIMEOUT_MS)) in expectOnSetWarningAndLimit()
60 assertEquals(CallbackType.OnSetAlert(quotaBytes), history.poll(DEFAULT_TIMEOUT_MS)) in expectOnSetAlert()
65 val cb = history.poll(timeout) in assertNoCallback()
DTestableNetworkCallback.kt122 val history = backingRecord.newReadHead() in anyNetwork() constant in com.android.testutils.RecorderCallback
123 val mark get() = history.mark in anyNetwork()
127 history.add(Available(network)) in anyNetwork()
135 history.add(CapabilitiesChanged(network, caps)) in anyNetwork()
140 history.add(LinkPropertiesChanged(network, lp)) in anyNetwork()
145 history.add(LocalInfoChanged(network, info)) in anyNetwork()
150 history.add(BlockedStatus(network, blocked)) in anyNetwork()
158 history.add(Suspended(network)) in anyNetwork()
163 history.add(Resumed(network)) in anyNetwork()
168 history.add(Losing(network, maxMsToLive)) in anyNetwork()
[all …]
DTestableNetworkOfferCallback.kt29 val history = ArrayTrackRecord<CallbackEntry>().newReadHead() constant
42 history.add(CallbackEntry.OnNetworkNeeded(request)) in onNetworkNeeded()
50 history.add(CallbackEntry.OnNetworkUnneeded(request)) in onNetworkUnneeded()
56 val event = history.poll(timeoutMs) in expectCallbackThat()
72 val cb = history.poll(noCallbackTimeoutMs) in assertNoCallback()
/packages/modules/Virtualization/virtualizationservice/src/
Dmaintenance.rs309 history: Arc<Mutex<Vec<SkOp>>>, field
321 self.history.lock().unwrap().push(SkOp::Management); in processSecretManagementRequest()
330 self.history.lock().unwrap().push(SkOp::DeleteIds(ids.iter().map(|s| s.id).collect())); in deleteIds()
335 self.history.lock().unwrap().push(SkOp::DeleteAll); in deleteAll()
341 fn new_test_state(history: Arc<Mutex<Vec<SkOp>>>, batch_size: usize) -> State { in new_test_state()
343 let sk = FakeSk { history }; in new_test_state()
384 let history = Arc::new(Mutex::new(Vec::new())); in test_sk_state_batching() localVariable
385 let sk_state = new_test_state(history.clone(), 2); in test_sk_state_batching()
387 let got = (*history.lock().unwrap()).clone(); in test_sk_state_batching()
400 let history = Arc::new(Mutex::new(Vec::new())); in test_sk_state_no_batching() localVariable
[all …]
/packages/modules/Connectivity/framework-t/src/android/net/
DNetworkStatsCollection.java437 final NetworkStatsHistory history = findOrCreateHistory(ident, uid, set, tag); in recordData() local
438 history.recordData(start, end, entry); in recordData()
439 noteRecordedHistory(history.getStart(), history.getEnd(), entry.rxBytes + entry.txBytes); in recordData()
447 public void recordHistory(@NonNull Key key, @NonNull NetworkStatsHistory history) { in recordHistory() argument
449 Objects.requireNonNull(history); in recordHistory()
450 if (history.size() == 0) return; in recordHistory()
451 noteRecordedHistory(history.getStart(), history.getEnd(), history.getTotalBytes()); in recordHistory()
455 target = new NetworkStatsHistory(history.getBucketDuration()); in recordHistory()
458 target.recordEntireHistory(history); in recordHistory()
529 final NetworkStatsHistory history = new NetworkStatsHistory(in); in read() local
[all …]
/packages/modules/Bluetooth/system/bta/test/
Dbta_gatt_client_test.cc63 std::vector<bluetooth::common::TimestampedEntry<std::string>> history = in TEST_F() local
65 ASSERT_EQ(3UL, history.size()); in TEST_F()
66 ASSERT_STREQ(a[0].c_str(), history[0].entry.c_str()); in TEST_F()
67 ASSERT_STREQ(a[1].c_str(), history[1].entry.c_str()); in TEST_F()
68 ASSERT_STREQ(a[2].c_str(), history[2].entry.c_str()); in TEST_F()
/packages/services/Car/cpp/evs/manager/1.1/stats/
DStatsCollector.cpp155 if (info->records[id].history.size() > info->maxCacheSize) { in collectLocked()
156 info->records[id].history.pop_front(); in collectLocked()
161 info->records[id].history.emplace_back(delta); in collectLocked()
324 id.c_str(), kSingleIndent, records.history.size(), kSingleIndent, in stopCustomCollection()
326 auto it = records.history.rbegin(); in stopCustomCollection()
327 while (it != records.history.rend()) { in stopCustomCollection()
341 targetId.c_str(), kSingleIndent, it->second.history.size(), kSingleIndent, in stopCustomCollection()
343 auto recordIter = it->second.history.rbegin(); in stopCustomCollection()
344 while (recordIter != it->second.history.rend()) { in stopCustomCollection()
423 id.c_str(), indent, records.history.size(), indent, interval); in toString()
[all …]
DCameraUsageStats.cpp61 it->second.history.emplace(roundtrip); in updateFrameStatsOnReturn()
63 if (it->second.history.size() > kMaxHistoryLength) { in updateFrameStatsOnReturn()
64 it->second.sum -= it->second.history.front(); in updateFrameStatsOnReturn()
65 it->second.history.pop(); in updateFrameStatsOnReturn()
148 len += rec.history.size(); in snapshot()
/packages/services/Car/cpp/evs/manager/aidl/stats/src/
DStatsCollector.cpp154 if (info->records[id].history.size() > info->maxCacheSize) { in collectLocked()
155 info->records[id].history.pop_front(); in collectLocked()
160 info->records[id].history.push_back(delta); in collectLocked()
331 id.data(), kSingleIndent, records.history.size(), kSingleIndent, in stopCustomCollection()
333 auto it = records.history.rbegin(); in stopCustomCollection()
334 while (it != records.history.rend()) { in stopCustomCollection()
348 targetId.data(), kSingleIndent, it->second.history.size(), kSingleIndent, in stopCustomCollection()
350 auto recordIter = it->second.history.rbegin(); in stopCustomCollection()
351 while (recordIter != it->second.history.rend()) { in stopCustomCollection()
429 id.data(), indent, records.history.size(), indent, interval); in toString()
[all …]
DCameraUsageStats.cpp56 it->second.history.push(roundTrip); in updateFrameStatsOnReturnLocked()
58 if (it->second.history.size() > kMaxHistoryLength) { in updateFrameStatsOnReturnLocked()
59 it->second.sum -= it->second.history.front(); in updateFrameStatsOnReturnLocked()
60 it->second.history.pop(); in updateFrameStatsOnReturnLocked()
143 len += rec.history.size(); in snapshot()
/packages/modules/Connectivity/tests/unit/java/com/android/server/net/
DTestableUsageCallback.kt36 private val history = LinkedBlockingQueue<CallbackType>() constant
39 history.add(CallbackType.OnThresholdReached(request)) in onThresholdReached()
43 history.add(CallbackType.OnCallbackReleased(request)) in onCallbackReleased()
56 val cb = history.poll(timeout, TimeUnit.MILLISECONDS) in assertNoCallback()
66 history.poll(timeoutMs, TimeUnit.MILLISECONDS).let { in expectCallback()
/packages/apps/Car/Launcher/app/src/com/android/car/carlauncher/homescreen/audio/media/
DMediaCardPanelViewPagerAdapter.java68 FrameLayout history = holder.itemView.findViewById(R.id.history_list_container); in onBindViewHolder() local
75 history.setVisibility(View.GONE); in onBindViewHolder()
82 history.setVisibility(View.GONE); in onBindViewHolder()
86 mHistoryCreator.createHistoryController(history); in onBindViewHolder()
87 history.setVisibility(View.VISIBLE); in onBindViewHolder()
99 history.setVisibility(View.GONE); in onBindViewHolder()
103 mHistoryCreator.createHistoryController(history); in onBindViewHolder()
104 history.setVisibility(View.VISIBLE); in onBindViewHolder()
/packages/apps/Settings/src/com/android/settings/notification/history/
DHistoryLoader.java17 package com.android.settings.notification.history;
52 NotificationHistory history = in load() local
55 while (history.hasNextNotification()) { in load()
56 HistoricalNotification hn = history.getNextNotification(); in load()
/packages/apps/DocumentsUI/src/com/android/documentsui/queries/
DSearchFragment.java194 final String history = getItem(position); in getView() local
198 text.setText(history); in getView()
200 mSearchViewManager.removeHistory(history); in getView()
201 mHistoryList.remove(history); in getView()
205 getContext().getString(R.string.delete_search_history, history)); in getView()
DSearchHistoryManager.java127 for (String history : mHistory) { in getHistoryList()
128 if (history.contains(keyword)) { in getHistoryList()
129 filterKeyword.add(history); in getHistoryList()
/packages/apps/Settings/protos/
Dfuelgauge_log.proto8 // Store history of setting optimize mode
34 // Store history of battery usage periodic job
/packages/apps/Dialer/java/com/android/dialer/historyitemactions/
Dhistory_item_bottom_sheet_header_info.proto12 // Contains information necessary to construct the header for a history item's
15 // A history item is one that is displayed in the call log or the voicemail
/packages/modules/Connectivity/tests/unit/java/android/net/netstats/
DNetworkStatsDataMigrationUtilsTest.kt78 for (history in entries.values) { in assertValues() constant
79 for (historyEntry in history.entries) { in assertValues()
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/mdns/
DMdnsServiceCacheTest.kt66 val history = ArrayTrackRecord<ExpiredEvent>().newReadHead() in <lambda>() constant in com.android.server.connectivity.mdns.MdnsServiceCacheTest.ExpiredRecord
81 history.add(ServiceRecordExpired(previousResponse, newResponse)) in <lambda>()
88 val event = history.poll(timeoutMs) in <lambda>()
95 val cb = history.poll(NO_CALLBACK_TIMEOUT_MS) in <lambda>()
/packages/modules/Bluetooth/system/bta/le_audio/
Dle_audio_log_history.cc84 std::vector<Record> history = history_->Pull(); in Dump() local
85 for (auto& record : history) { in Dump()

1234