Home
last modified time | relevance | path

Searched refs:counter (Results 1 – 25 of 77) sorted by relevance

1234

/frameworks/compile/mclinker/unittests/
DFactoriesTest.cpp59 int counter = 0; in TEST_F() local
63 ASSERT_EQ(counter, *(*data).data); in TEST_F()
66 ++counter; in TEST_F()
80 int counter = 0; in TEST_F() local
84 ASSERT_EQ(counter, *(*data).data); in TEST_F()
87 ++counter; in TEST_F()
102 int counter = 0; in TEST_F() local
106 ASSERT_EQ(counter, *(*data).data); in TEST_F()
109 ++counter; in TEST_F()
119 int counter = 0; in TEST_F() local
[all …]
DHashTableTest.cpp249 int counter = 0; in TEST_F() local
252 ++counter; in TEST_F()
254 EXPECT_EQ(400000, counter); in TEST_F()
271 int counter = 0; in TEST_F() local
275 ++counter; in TEST_F()
277 EXPECT_EQ(1, counter); in TEST_F()
DRTLinearAllocatorTest.cpp116 int counter = 0; in TEST_F() local
121 pointer->one = counter; in TEST_F()
123 ++counter; in TEST_F()
DLinearAllocatorTest.cpp115 int counter = 0; in TEST_F() local
120 pointer->one = counter; in TEST_F()
122 ++counter; in TEST_F()
/frameworks/ml/nn/common/random/
Dphilox_random.h135 PhiloxRandom(ResultType counter, Key key) : counter_(counter), key_(key) {} in PhiloxRandom() argument
159 ResultType counter = counter_; in operator() local
164 counter = ComputeSingleRound(counter, key); in operator()
166 counter = ComputeSingleRound(counter, key); in operator()
168 counter = ComputeSingleRound(counter, key); in operator()
170 counter = ComputeSingleRound(counter, key); in operator()
172 counter = ComputeSingleRound(counter, key); in operator()
174 counter = ComputeSingleRound(counter, key); in operator()
176 counter = ComputeSingleRound(counter, key); in operator()
178 counter = ComputeSingleRound(counter, key); in operator()
[all …]
Dguarded_philox_random.cc33 void GuardedPhiloxRandom::Init(random::PhiloxRandom::ResultType counter, in Init() argument
37 generator_ = random::PhiloxRandom(counter, key); in Init()
/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DBatteryStatsCounterTest.java37 final BatteryStatsImpl.Counter counter = new BatteryStatsImpl.Counter(timeBase); in testCounter() local
41 counter.stepAtomic(); in testCounter()
42 counter.stepAtomic(); in testCounter()
43 counter.stepAtomic(); in testCounter()
44 counter.stepAtomic(); in testCounter()
45 counter.stepAtomic(); in testCounter()
46 assertEquals(0, counter.getCountLocked(BatteryStats.STATS_SINCE_CHARGED)); in testCounter()
50 counter.stepAtomic(); in testCounter()
51 counter.stepAtomic(); in testCounter()
52 counter.stepAtomic(); in testCounter()
[all …]
/frameworks/av/drm/libmediadrm/
DDrmMetrics.cpp95 DrmFrameworkMetrics::Counter *counter = in GetSerializedMetrics() local
97 counter->set_count(value); in GetSerializedMetrics()
98 counter->mutable_attributes()->set_error_code(status); in GetSerializedMetrics()
103 DrmFrameworkMetrics::Counter *counter = in GetSerializedMetrics() local
105 counter->set_count(value); in GetSerializedMetrics()
106 counter->mutable_attributes()->set_error_code(status); in GetSerializedMetrics()
111 DrmFrameworkMetrics::Counter *counter = in GetSerializedMetrics() local
113 counter->set_count(value); in GetSerializedMetrics()
114 counter->mutable_attributes()->set_error_code(status); in GetSerializedMetrics()
119 DrmFrameworkMetrics::Counter *counter = in GetSerializedMetrics() local
[all …]
DDrmMetricsConsumer.cpp58 void ExportCounterMetric(const android::CounterMetric<T> &counter, in ExportCounterMetric() argument
64 std::string success_count_name = counter.metric_name() + ".ok.count"; in ExportCounterMetric()
65 std::string error_count_name = counter.metric_name() + ".error.count"; in ExportCounterMetric()
67 counter.ExportValues( in ExportCounterMetric()
82 std::string error_list_name = counter.metric_name() + ".error.list"; in ExportCounterMetric()
90 const android::CounterMetric<T> &counter, PersistableBundle *metrics) { in ExportCounterMetricWithAttributeNames() argument
95 counter.ExportValues([&](const T &attribute, const int64_t value) { in ExportCounterMetricWithAttributeNames()
96 std::string name = counter.metric_name() + "." + in ExportCounterMetricWithAttributeNames()
/frameworks/base/core/java/com/android/internal/os/
DBluetoothPowerCalculator.java40 final BatteryStats.ControllerActivityCounter counter = u.getBluetoothControllerActivity(); in calculateApp() local
41 if (counter == null) { in calculateApp()
45 final long idleTimeMs = counter.getIdleTimeCounter().getCountLocked(statsType); in calculateApp()
46 final long rxTimeMs = counter.getRxTimeCounter().getCountLocked(statsType); in calculateApp()
47 final long txTimeMs = counter.getTxTimeCounters()[0].getCountLocked(statsType); in calculateApp()
49 double powerMah = counter.getPowerCounter().getCountLocked(statsType) in calculateApp()
69 final BatteryStats.ControllerActivityCounter counter = in calculateRemaining() local
72 final long idleTimeMs = counter.getIdleTimeCounter().getCountLocked(statsType); in calculateRemaining()
73 final long txTimeMs = counter.getTxTimeCounters()[0].getCountLocked(statsType); in calculateRemaining()
74 final long rxTimeMs = counter.getRxTimeCounter().getCountLocked(statsType); in calculateRemaining()
[all …]
DWifiPowerCalculator.java43 final BatteryStats.ControllerActivityCounter counter = u.getWifiControllerActivity(); in calculateApp() local
44 if (counter == null) { in calculateApp()
48 final long idleTime = counter.getIdleTimeCounter().getCountLocked(statsType); in calculateApp()
49 final long txTime = counter.getTxTimeCounters()[0].getCountLocked(statsType); in calculateApp()
50 final long rxTime = counter.getRxTimeCounter().getCountLocked(statsType); in calculateApp()
77 final BatteryStats.ControllerActivityCounter counter = stats.getWifiControllerActivity(); in calculateRemaining() local
79 final long idleTimeMs = counter.getIdleTimeCounter().getCountLocked(statsType); in calculateRemaining()
80 final long txTimeMs = counter.getTxTimeCounters()[0].getCountLocked(statsType); in calculateRemaining()
81 final long rxTimeMs = counter.getRxTimeCounter().getCountLocked(statsType); in calculateRemaining()
86 double powerDrainMah = counter.getPowerCounter().getCountLocked(statsType) in calculateRemaining()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/
DIntCounterTest.java45 IntCounter counter = new IntCounter(); in testEmpty() local
46 assertKeyCountsEqual(new Int32Count[0], counter.toProto()); in testEmpty()
54 IntCounter counter = new IntCounter(); in testAddToCounter() local
57 counter.increment(k); in testAddToCounter()
71 assertKeyCountsEqual(expected, counter.toProto()); in testAddToCounter()
79 IntCounter counter = new IntCounter(-5, 100); in testAddToClampedCounter() local
82 counter.increment(k); in testAddToClampedCounter()
91 assertKeyCountsEqual(expected, counter.toProto()); in testAddToClampedCounter()
/frameworks/base/core/tests/coretests/src/android/widget/listview/arrowscroll/
DListItemFocusablesFarApartTest.java87 int counter = 0; in testPanWhenNextFocusableTooFarDown() local
90 if (counter > 5) fail("couldn't reach next button within " + counter + " downs"); in testPanWhenNextFocusableTooFarDown()
93 … assertFalse("after " + counter + " downs, top button not visible, should not have focus", in testPanWhenNextFocusableTooFarDown()
95 …assertFalse("after " + counter + " downs, neither top button nor botom button visible, nothng with… in testPanWhenNextFocusableTooFarDown()
98 … assertTrue("after " + counter + " downs, top button still visible, should have focus", in testPanWhenNextFocusableTooFarDown()
102 assertEquals("after " + counter + " downs, " + in testPanWhenNextFocusableTooFarDown()
108 counter++; in testPanWhenNextFocusableTooFarDown()
/frameworks/layoutlib/bridge/src/com/android/internal/util/
DVirtualRefBasePtr_Delegate.java38 long counter = sRefCount.get(ptr); in nIncStrong() local
39 sRefCount.put(ptr, ++counter); in nIncStrong()
44 long counter = sRefCount.get(ptr); in nDecStrong() local
46 if (counter > 1) { in nDecStrong()
47 sRefCount.put(ptr, --counter); in nDecStrong()
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/samples/simplecamera/
DAverageFilter.java34 private int counter = 0; field in AverageFilter
57 if (counter < NUM_FRAMES && counter >= 0) { in onProcess()
58 temp[counter] = ((Float)inFrameValue.getValue()).floatValue(); in onProcess()
61 counter = (counter + 1) % NUM_FRAMES; in onProcess()
/frameworks/base/services/tests/servicestests/src/com/android/server/net/watchlist/
DNetworkWatchlistServiceTests.java83 int counter = 0; field in NetworkWatchlistServiceTests.TestIIpConnectivityMetrics
99 counter++; in addNetdEventCallback()
106 counter--; in removeNetdEventCallback()
148 assertEquals(connectivityMetrics.counter, 0); in testStartStopWatchlistLogging()
151 assertEquals(connectivityMetrics.counter, 1); in testStartStopWatchlistLogging()
153 assertEquals(connectivityMetrics.counter, 1); in testStartStopWatchlistLogging()
155 assertEquals(connectivityMetrics.counter, 0); in testStartStopWatchlistLogging()
157 assertEquals(connectivityMetrics.counter, 0); in testStartStopWatchlistLogging()
159 assertEquals(connectivityMetrics.counter, 1); in testStartStopWatchlistLogging()
161 assertEquals(connectivityMetrics.counter, 0); in testStartStopWatchlistLogging()
/frameworks/base/test-runner/src/android/test/
DSyncBaseInstrumentation.java62 int counter = 0; in syncProvider() local
65 while (counter < 2) { in syncProvider()
74 counter = 0; in syncProvider()
77 counter++; in syncProvider()
/frameworks/opt/telephony/tools/
Dtdi25 counter="--ei counter $2";
27 echo "counter=$counter"
40 …adb shell am broadcast -a com.android.internal.telephony.$the_DC.action_fail_bringup $counter $fai…
/frameworks/av/media/libaaudio/src/utility/
DMonotonicCounter.h46 void catchUpTo(int64_t counter) { in catchUpTo() argument
47 if ((counter - mCounter64) > 0) { in catchUpTo()
48 mCounter64 = counter; in catchUpTo()
/frameworks/av/media/libaaudio/src/client/
DAudioEndpoint.cpp85 fifo_counter_t counter = *descriptor->readCounterAddress; in AudioEndpoint_validateQueueDescriptor() local
87 (int) counter); in AudioEndpoint_validateQueueDescriptor()
88 *descriptor->readCounterAddress = counter; in AudioEndpoint_validateQueueDescriptor()
93 fifo_counter_t counter = *descriptor->writeCounterAddress; in AudioEndpoint_validateQueueDescriptor() local
95 (int) counter); in AudioEndpoint_validateQueueDescriptor()
96 *descriptor->writeCounterAddress = counter; in AudioEndpoint_validateQueueDescriptor()
/frameworks/av/media/libstagefright/codecs/m4v_h263/dec/src/
Dchvr_filter.cpp35 int index, counter; in CombinedHorzVertRingFilter() local
153 for (counter = 0; counter < 5; counter++) in CombinedHorzVertRingFilter()
156 sum = sum - v[counter] + *ptr_n; in CombinedHorzVertRingFilter()
311 for (counter = 0; counter < 5; counter++) in CombinedHorzVertRingFilter()
314 sum = sum - v[counter] + *ptr_n; in CombinedHorzVertRingFilter()
/frameworks/av/media/libaaudio/tests/
Dtest_atomic_fifo.cpp300 fifo_counter_t counter = -9876; in checkNegativeCounters() local
301 mFifoBuffer.setWriteCounter(counter); in checkNegativeCounters()
302 mFifoBuffer.setReadCounter(counter); in checkNegativeCounters()
309 fifo_counter_t counter = INT64_MAX - 10; in checkHalfWrap() local
310 mFifoBuffer.setWriteCounter(counter); in checkHalfWrap()
311 mFifoBuffer.setReadCounter(counter); in checkHalfWrap()
319 fifo_counter_t counter = -10; in checkFullWrap() local
320 mFifoBuffer.setWriteCounter(counter); in checkFullWrap()
321 mFifoBuffer.setReadCounter(counter); in checkFullWrap()
/frameworks/wilhelm/tests/mimeUri/
DslesTestGetPositionUri.cpp148 SLuint16 counter = 0; in TestGetPositionUri() local
269 while ((counter*1000) < durationInMsec) { in TestGetPositionUri()
270 counter++; in TestGetPositionUri()
275 counter); in TestGetPositionUri()
278 fprintf(stderr, "position is %dms %ds after start\n", posInMsec, counter); in TestGetPositionUri()
283 if (((SLint32)posInMsec > (counter*1000 + TIME_TOLERANCE_MS)) || in TestGetPositionUri()
284 ((SLint32)posInMsec < (counter*1000 - TIME_TOLERANCE_MS))) { in TestGetPositionUri()
/frameworks/base/cmds/statsd/src/metrics/
DCountMetricProducer.cpp192 for (const auto& counter : mPastBuckets) { in onDumpReportLocked() local
193 const MetricDimensionKey& dimensionKey = counter.first; in onDumpReportLocked()
217 for (const auto& bucket : counter.second) { in onDumpReportLocked()
344 for (const auto& counter : *mCurrentSlicedCounter) { in flushCurrentBucketLocked()
345 info.mCount = counter.second; in flushCurrentBucketLocked()
346 auto& bucketList = mPastBuckets[counter.first]; in flushCurrentBucketLocked()
349 counter.first.toString().c_str(), in flushCurrentBucketLocked()
350 (long long)counter.second); in flushCurrentBucketLocked()
/frameworks/base/services/core/java/com/android/server/am/
DHealthStatsBatteryStatsWriter.java170 for (final BatteryStats.LongCounter counter: controller.getTxTimeCounters()) { in writeUid()
171 sum += counter.getCountLocked(STATS_SINCE_CHARGED); in writeUid()
189 for (final BatteryStats.LongCounter counter: controller.getTxTimeCounters()) { in writeUid()
190 sum += counter.getCountLocked(STATS_SINCE_CHARGED); in writeUid()
208 for (final BatteryStats.LongCounter counter: controller.getTxTimeCounters()) { in writeUid()
209 sum += counter.getCountLocked(STATS_SINCE_CHARGED); in writeUid()
434 final BatteryStats.Counter counter = entry.getValue(); in writePkg() local
435 if (counter != null) { in writePkg()
437 entry.getKey(), counter.getCountLocked(STATS_SINCE_CHARGED)); in writePkg()

1234