Home
last modified time | relevance | path

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

/packages/modules/NetworkStack/tests/unit/src/com/android/networkstack/metrics/
DApfSessionInfoMetricsTest.java21 import android.net.apf.ApfCounterTracker.Counter;
45 mMetrics.addApfCounter(Counter.TOTAL_PACKETS, 5678); in testApfSessionInfoMetrics_VerifyCollectMetrics()
46 mMetrics.addApfCounter(Counter.PASSED_ARP_UNICAST_REPLY, 1010); in testApfSessionInfoMetrics_VerifyCollectMetrics()
47 mMetrics.addApfCounter(Counter.DROPPED_MDNS, 333); in testApfSessionInfoMetrics_VerifyCollectMetrics()
79 for (Counter counter : Counter.class.getEnumConstants()) { in testApfSessionInfoMetrics_VerifyMaxApfCounter()
82 final int expectedApfCounterCount = Counter.class.getEnumConstants().length - 1; in testApfSessionInfoMetrics_VerifyMaxApfCounter()
88 private void verifyCounterName(Counter counter, in verifyCounterName()
95 verifyCounterName(Counter.RESERVED_OOB, CounterName.CN_UNKNOWN); in testApfSessionInfoMetrics_VerifyApfCounterToEnum()
96 verifyCounterName(Counter.TOTAL_PACKETS, CounterName.CN_TOTAL_PACKETS); in testApfSessionInfoMetrics_VerifyApfCounterToEnum()
97 verifyCounterName(Counter.PASSED_ARP, CounterName.CN_PASSED_ARP); in testApfSessionInfoMetrics_VerifyApfCounterToEnum()
[all …]
/packages/modules/NetworkStack/src/android/net/apf/
DApfCounterTracker.java41 public enum Counter { enum in ApfCounterTracker
122 return (Counter.class.getEnumConstants().length - 1) * 4; in totalSize()
129 public static Counter getCounterEnumFromOffset(int offset) { in getCounterEnumFromOffset()
130 for (Counter cnt : Counter.class.getEnumConstants()) { in getCounterEnumFromOffset()
139 public static final Counter MIN_DROP_COUNTER = Counter.DROPPED_ETH_BROADCAST;
140 public static final Counter MAX_DROP_COUNTER = Counter.DROPPED_GARP_REPLY;
141 public static final Counter MIN_PASS_COUNTER = Counter.PASSED_ARP;
142 public static final Counter MAX_PASS_COUNTER = Counter.PASSED_MLD;
146 private final List<Counter> mCounterList;
148 private final Map<Counter, Long> mCounters = new ArrayMap<>();
[all …]
DApfV4Generator.java95 public ApfV4Generator addCountAndPass(ApfCounterTracker.Counter counter) { in addCountAndPass()
109 public ApfV4Generator addCountAndDrop(ApfCounterTracker.Counter counter) { in addCountAndDrop()
115 public ApfV4Generator addCountAndDropIfR0Equals(long val, ApfCounterTracker.Counter cnt) { in addCountAndDropIfR0Equals()
121 public ApfV4Generator addCountAndPassIfR0Equals(long val, ApfCounterTracker.Counter cnt) { in addCountAndPassIfR0Equals()
127 public ApfV4Generator addCountAndDropIfR0NotEquals(long val, ApfCounterTracker.Counter cnt) { in addCountAndDropIfR0NotEquals()
133 public ApfV4Generator addCountAndPassIfR0NotEquals(long val, ApfCounterTracker.Counter cnt) { in addCountAndPassIfR0NotEquals()
139 public ApfV4Generator addCountAndDropIfR0AnyBitsSet(long val, ApfCounterTracker.Counter cnt) { in addCountAndDropIfR0AnyBitsSet()
145 public ApfV4Generator addCountAndPassIfR0AnyBitsSet(long val, ApfCounterTracker.Counter cnt) { in addCountAndPassIfR0AnyBitsSet()
151 public ApfV4Generator addCountAndDropIfR0LessThan(long val, ApfCounterTracker.Counter cnt) { in addCountAndDropIfR0LessThan()
160 public ApfV4Generator addCountAndPassIfR0LessThan(long val, ApfCounterTracker.Counter cnt) { in addCountAndPassIfR0LessThan()
[all …]
DApfV4GeneratorBase.java296 public abstract Type addCountAndDropIfR0Equals(long val, ApfCounterTracker.Counter cnt) in addCountAndDropIfR0Equals()
304 public abstract Type addCountAndPassIfR0Equals(long val, ApfCounterTracker.Counter cnt) in addCountAndPassIfR0Equals()
320 public abstract Type addCountAndDropIfR0NotEquals(long val, ApfCounterTracker.Counter cnt) in addCountAndDropIfR0NotEquals()
328 public abstract Type addCountAndPassIfR0NotEquals(long val, ApfCounterTracker.Counter cnt) in addCountAndPassIfR0NotEquals()
344 public abstract Type addCountAndDropIfR0GreaterThan(long val, ApfCounterTracker.Counter cnt) in addCountAndDropIfR0GreaterThan()
352 public abstract Type addCountAndPassIfR0GreaterThan(long val, ApfCounterTracker.Counter cnt) in addCountAndPassIfR0GreaterThan()
368 public abstract Type addCountAndDropIfR0LessThan(long val, ApfCounterTracker.Counter cnt) in addCountAndDropIfR0LessThan()
376 public abstract Type addCountAndPassIfR0LessThan(long val, ApfCounterTracker.Counter cnt) in addCountAndPassIfR0LessThan()
392 public abstract Type addCountAndDropIfR0AnyBitsSet(long val, ApfCounterTracker.Counter cnt) in addCountAndDropIfR0AnyBitsSet()
400 public abstract Type addCountAndPassIfR0AnyBitsSet(long val, ApfCounterTracker.Counter cnt) in addCountAndPassIfR0AnyBitsSet()
[all …]
DApfV6GeneratorBase.java591 public final Type addCountAndPass(ApfCounterTracker.Counter counter) { in addCountAndPass()
603 public final Type addCountAndDrop(ApfCounterTracker.Counter counter) { in addCountAndDrop()
609 public final Type addCountAndDropIfR0Equals(long val, ApfCounterTracker.Counter cnt) in addCountAndDropIfR0Equals()
616 public final Type addCountAndPassIfR0Equals(long val, ApfCounterTracker.Counter cnt) in addCountAndPassIfR0Equals()
623 public final Type addCountAndDropIfR0NotEquals(long val, ApfCounterTracker.Counter cnt) in addCountAndDropIfR0NotEquals()
630 public final Type addCountAndPassIfR0NotEquals(long val, ApfCounterTracker.Counter cnt) in addCountAndPassIfR0NotEquals()
637 public Type addCountAndDropIfR0AnyBitsSet(long val, ApfCounterTracker.Counter cnt) in addCountAndDropIfR0AnyBitsSet()
649 public Type addCountAndPassIfR0AnyBitsSet(long val, ApfCounterTracker.Counter cnt) in addCountAndPassIfR0AnyBitsSet()
661 public final Type addCountAndDropIfR0LessThan(long val, ApfCounterTracker.Counter cnt) in addCountAndDropIfR0LessThan()
671 public final Type addCountAndPassIfR0LessThan(long val, ApfCounterTracker.Counter cnt) in addCountAndPassIfR0LessThan()
[all …]
DApfFilter.java67 import static android.net.apf.ApfCounterTracker.Counter.DROPPED_IPV6_NS_INVALID;
68 import static android.net.apf.ApfCounterTracker.Counter.DROPPED_IPV6_NS_OTHER_HOST;
69 import static android.net.apf.ApfCounterTracker.Counter.PASSED_IPV6_NS_MULTIPLE_OPTIONS;
70 import static android.net.apf.ApfCounterTracker.Counter.PASSED_IPV6_NS_NO_ADDRESS;
115 import android.net.apf.ApfCounterTracker.Counter;
1273 gen.addCountAndDrop(Counter.DROPPED_RA); in generateFilterLocked()
1357 gen.addCountAndDrop(Counter.DROPPED_IPV4_NATT_KEEPALIVE); in generateFilterLocked()
1476 gen.addCountAndDrop(Counter.DROPPED_IPV4_KEEPALIVE_ACK); in generateFilterLocked()
1588 gen.addCountAndDrop(Counter.DROPPED_ARP_V6_ONLY); in generateArpFilterLocked()
1594 gen.addCountAndDropIfBytesAtR0NotEqual(ARP_IPV4_HEADER, Counter.DROPPED_ARP_NON_IPV4); in generateArpFilterLocked()
[all …]
DLegacyApfFilter.java49 import android.net.apf.ApfCounterTracker.Counter;
128 private void maybeSetupCounter(ApfV4Generator gen, Counter c) { in maybeSetupCounter()
1017 maybeSetupCounter(gen, Counter.DROPPED_RA); in generateFilterLocked()
1103 maybeSetupCounter(gen, Counter.DROPPED_IPV4_NATT_KEEPALIVE); in generateFilterLocked()
1222 maybeSetupCounter(gen, Counter.DROPPED_IPV4_KEEPALIVE_ACK); in generateFilterLocked()
1333 maybeSetupCounter(gen, Counter.PASSED_ARP_NON_IPV4); in generateArpFilterLocked()
1339 maybeSetupCounter(gen, Counter.PASSED_ARP_UNKNOWN); in generateArpFilterLocked()
1344 maybeSetupCounter(gen, Counter.DROPPED_ARP_REPLY_SPA_NO_HOST); in generateArpFilterLocked()
1349 maybeSetupCounter(gen, Counter.PASSED_ARP_UNICAST_REPLY); in generateArpFilterLocked()
1357 maybeSetupCounter(gen, Counter.DROPPED_GARP_REPLY); in generateArpFilterLocked()
[all …]
DApfV6Generator.java45 mMaximumApfProgramSize - ApfCounterTracker.Counter.totalSize() - programSize); in updateExceptionBufferSize()
DBaseApfGenerator.java722 void checkPassCounterRange(ApfCounterTracker.Counter cnt) { in checkPassCounterRange()
733 void checkDropCounterRange(ApfCounterTracker.Counter cnt) { in checkDropCounterRange()
/packages/modules/NetworkStack/tests/unit/src/android/net/apf/
DApfStandaloneTest.kt78 val dataRegion = ByteArray(Counter.totalSize()) { 0 } in runApfTest()
86 assertEquals(mapOf<Counter, Long>( in runApfTest()
87 Counter.TOTAL_PACKETS to 1, in runApfTest()
88 Counter.DROPPED_ETHERTYPE_DENYLISTED to 1 in runApfTest()
147 assertEquals(mapOf<Counter, Long>( in runApfTest()
148 Counter.TOTAL_PACKETS to 2, in runApfTest()
149 Counter.DROPPED_ETHERTYPE_DENYLISTED to 1, in runApfTest()
150 Counter.DROPPED_DHCP_REQUEST_DISCOVERY to 1 in runApfTest()
179 assertEquals(mapOf<Counter, Long>( in runApfTest()
180 Counter.TOTAL_PACKETS to 3, in runApfTest()
[all …]
DApfNewTest.kt22 import android.net.apf.ApfCounterTracker.Counter
23 import android.net.apf.ApfCounterTracker.Counter.APF_PROGRAM_ID
24 import android.net.apf.ApfCounterTracker.Counter.APF_VERSION
25 import android.net.apf.ApfCounterTracker.Counter.CORRUPT_DNS_PACKET
26 import android.net.apf.ApfCounterTracker.Counter.DROPPED_ARP_REQUEST_REPLIED
27 import android.net.apf.ApfCounterTracker.Counter.DROPPED_ETHERTYPE_NOT_ALLOWED
28 import android.net.apf.ApfCounterTracker.Counter.DROPPED_ETH_BROADCAST
29 import android.net.apf.ApfCounterTracker.Counter.DROPPED_IPV4_NON_DHCP4
30 import android.net.apf.ApfCounterTracker.Counter.DROPPED_IPV6_NS_INVALID
31 import android.net.apf.ApfCounterTracker.Counter.DROPPED_IPV6_NS_OTHER_HOST
[all …]
DLegacyApfTest.java56 import android.net.apf.ApfCounterTracker.Counter;
327 byte[] data = new byte[Counter.totalSize()]; in testApfFilterPcapFile()
1838 final byte[] data = new byte[Counter.totalSize()]; in testApfSessionInfoMetrics_LegacyApfFilter()
1840 final int totalPacketsCounterIdx = Counter.totalSize() + Counter.TOTAL_PACKETS.offset(); in testApfSessionInfoMetrics_LegacyApfFilter()
1842 Counter.totalSize() + Counter.PASSED_IPV6_ICMP.offset(); in testApfSessionInfoMetrics_LegacyApfFilter()
1844 Counter.totalSize() + Counter.DROPPED_IPV4_MULTICAST.offset(); in testApfSessionInfoMetrics_LegacyApfFilter()
1881 final Map<Counter, Long> expectedCounters = Map.of(Counter.TOTAL_PACKETS, 2L, in testApfSessionInfoMetrics_LegacyApfFilter()
1882 Counter.PASSED_IPV6_ICMP, 1L, Counter.DROPPED_IPV4_MULTICAST, 1L); in testApfSessionInfoMetrics_LegacyApfFilter()
1883 final ArgumentCaptor<Counter> counterCaptor = ArgumentCaptor.forClass(Counter.class); in testApfSessionInfoMetrics_LegacyApfFilter()
1887 final List<Counter> counters = counterCaptor.getAllValues(); in testApfSessionInfoMetrics_LegacyApfFilter()
[all …]
DApfTestUtils.java166 final int apfVersionIdx = ApfCounterTracker.Counter.totalSize() in assertDataMemoryContents()
167 + ApfCounterTracker.Counter.APF_VERSION.offset(); in assertDataMemoryContents()
168 final int apfProgramIdIdx = ApfCounterTracker.Counter.totalSize() in assertDataMemoryContents()
169 + ApfCounterTracker.Counter.APF_PROGRAM_ID.offset(); in assertDataMemoryContents()
DApfTest.java19 import static android.net.apf.ApfCounterTracker.Counter.getCounterEnumFromOffset;
72 import android.net.apf.ApfCounterTracker.Counter;
1031 byte[] data = new byte[Counter.totalSize()]; in testApfFilterPcapFile()
3205 final byte[] data = new byte[Counter.totalSize()]; in testApfSessionInfoMetrics()
3207 final int totalPacketsCounterIdx = Counter.totalSize() + Counter.TOTAL_PACKETS.offset(); in testApfSessionInfoMetrics()
3209 Counter.totalSize() + Counter.PASSED_IPV6_ICMP.offset(); in testApfSessionInfoMetrics()
3211 Counter.totalSize() + Counter.DROPPED_IPV4_MULTICAST.offset(); in testApfSessionInfoMetrics()
3248 final Map<Counter, Long> expectedCounters = Map.of(Counter.TOTAL_PACKETS, 2L, in testApfSessionInfoMetrics()
3249 Counter.PASSED_IPV6_ICMP, 1L, Counter.DROPPED_IPV4_MULTICAST, 1L); in testApfSessionInfoMetrics()
3250 final ArgumentCaptor<Counter> counterCaptor = ArgumentCaptor.forClass(Counter.class); in testApfSessionInfoMetrics()
[all …]
/packages/modules/DeviceLock/DeviceLockController/tests/android_test/src/com/android/devicelockcontroller/stats/
DStatsLoggerImplTest.java55 import com.android.modules.expresslog.Counter;
72 .mockStatic(Counter.class)
125 verify(() -> Counter.logIncrement(TEX_ID_DEVICE_RESET_PROVISION_MANDATORY)); in logDeviceReset_provisionMandatory_shouldLogToTelemetryExpress()
132 verify(() -> Counter.logIncrement(TEX_ID_DEVICE_RESET_PROVISION_DEFERRED)); in logDeviceReset_deferredProvision_shouldLogToTelemetryExpress()
139 verify(() -> Counter.logIncrement(TEX_ID_SUCCESSFUL_CHECK_IN_RESPONSE_COUNT)); in logSuccessfulCheckIn_shouldLogToTelemetryExpress()
146 verify(() -> Counter.logIncrement(TEX_ID_SUCCESSFUL_PROVISIONING_COUNT)); in logSuccessfulProvisioning_shouldLogToTelemetryExpress()
251 verify(() -> Counter.logIncrement(TEX_ID_SUCCESSFUL_LOCKING_COUNT)); in logSuccessfulLockingDevice_shouldWriteCorrectLog()
258 verify(() -> Counter.logIncrement(TEX_ID_SUCCESSFUL_UNLOCKING_COUNT)); in logSuccessfulUnlockingDevice_shouldWriteCorrectLog()
/packages/modules/DeviceLock/DeviceLockController/src/com/android/devicelockcontroller/stats/
DStatsLoggerImpl.java54 import com.android.modules.expresslog.Counter;
125 Counter.logIncrement(TEX_ID_DEVICE_RESET_PROVISION_MANDATORY); in logDeviceReset()
127 Counter.logIncrement(TEX_ID_DEVICE_RESET_PROVISION_DEFERRED); in logDeviceReset()
133 Counter.logIncrement(TEX_ID_SUCCESSFUL_CHECK_IN_RESPONSE_COUNT); in logSuccessfulCheckIn()
138 Counter.logIncrement(TEX_ID_SUCCESSFUL_PROVISIONING_COUNT); in logSuccessfulProvisioning()
213 Counter.logIncrement(TEX_ID_SUCCESSFUL_LOCKING_COUNT); in logSuccessfulLockingDevice()
218 Counter.logIncrement(TEX_ID_SUCCESSFUL_UNLOCKING_COUNT); in logSuccessfulUnlockingDevice()
/packages/modules/NetworkStack/src/com/android/networkstack/metrics/
DApfSessionInfoMetrics.java19 import android.net.apf.ApfCounterTracker.Counter;
33 public static final int MAX_NUM_OF_COUNTERS = Counter.class.getEnumConstants().length - 1;
55 public void addApfCounter(final Counter counter, final long value) { in addApfCounter()
106 public static CounterName apfFilterCounterToEnum(final Counter counter) { in apfFilterCounterToEnum()
/packages/modules/Connectivity/staticlibs/client-libs/tests/unit/src/com/android/net/module/util/
DNetdUtilsTest.java127 final Counter myCounter = new Counter(); in setNetworkAddInterfaceOutcome()
140 class Counter { class in NetdUtilsTest
/packages/modules/Bluetooth/service/src/
DAutoOnFeature.kt40 import com.android.modules.expresslog.Counter
142 Counter.logIncrement( in setUserEnabled()
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/
DHeadsetStateMachine.java58 import com.android.modules.expresslog.Counter;
1524 Counter.logIncrement("bluetooth.value_lc3_codec_usage_over_hfp"); in enter()
1526 Counter.logIncrement("bluetooth.value_aptx_codec_usage_over_hfp"); in enter()
1528 Counter.logIncrement("bluetooth.value_msbc_codec_usage_over_hfp"); in enter()
1530 Counter.logIncrement("bluetooth.value_cvsd_codec_usage_over_hfp"); in enter()
/packages/modules/Bluetooth/service/src/com/android/server/bluetooth/
DBluetoothManagerService.java90 import com.android.modules.expresslog.Counter;
693 Counter.logIncrement("bluetooth.value_auto_on_supported"); in BluetoothManagerService()
1161 Counter.logIncrement("bluetooth.value_auto_on_triggered"); in enableFromAutoOn()
/packages/modules/Profiling/service/java/com/android/os/profiling/
DConfigs.java698 .setCounter(PerfEvents.Counter.SW_CPU_CLOCK) in generateStackSamplingConfig()
/packages/modules/Bluetooth/framework/java/android/bluetooth/
DBluetoothAdapter.java74 import com.android.modules.expresslog.Counter;
3586 Counter.logIncrementWithUid( in closeProfileProxy()
/packages/services/Car/car-lib/src/android/car/navigation/
Dnavigation_state.proto428 // Counter-clockwise roundabout Clockwise roundabout
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/
DAdapterService.java154 import com.android.modules.expresslog.Counter;
2338 Counter.logIncrement("bluetooth.value_kill_from_binder_thread"); in killBluetoothProcess()