diff options
author | 2025-02-03 15:43:16 -0800 | |
---|---|---|
committer | 2025-02-20 13:27:55 -0800 | |
commit | e101f6ae5a31b10133d7d6f43bac888a87713e97 (patch) | |
tree | 951cc05d72c88b9ff9fc97eb90ca20cbfed2ddca /system/test | |
parent | 86d90eee9dd37eccdd19449b9d72b883df060f9b (diff) |
RFCOMM Metrics V2: Collect at port closure
Collect metrics in system/stack/rfcomm after tPORT structure closes
Bug: 374989690
Test: m com.android.bt && manual with Atom Tester
Flag: EXEMPT metrics
Change-Id: Idccdb2ab660e62a998d46293cea8495a761fa916
Diffstat (limited to 'system/test')
-rw-r--r-- | system/test/Android.bp | 7 | ||||
-rw-r--r-- | system/test/mock/mock_stack_rfcomm_metrics.cc | 21 |
2 files changed, 28 insertions, 0 deletions
diff --git a/system/test/Android.bp b/system/test/Android.bp index 9ed0a083b5..fabb5e9847 100644 --- a/system/test/Android.bp +++ b/system/test/Android.bp @@ -298,6 +298,13 @@ filegroup { } filegroup { + name: "TestMockStackRfcommMetrics", + srcs: [ + "mock/mock_stack_rfcomm_metrics.cc", + ], +} + +filegroup { name: "TestMockStackRnr", srcs: [ "mock/mock_stack_rnr_interface.cc", diff --git a/system/test/mock/mock_stack_rfcomm_metrics.cc b/system/test/mock/mock_stack_rfcomm_metrics.cc new file mode 100644 index 0000000000..f44af222b1 --- /dev/null +++ b/system/test/mock/mock_stack_rfcomm_metrics.cc @@ -0,0 +1,21 @@ +/* + * Copyright 2025 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "rfc_metrics.h" +#include "stack/rfcomm/port_int.h" +#include "test/common/mock_functions.h" + +void port_collect_attempt_metrics(tPORT* /* p_port */) { inc_func_call_count(__func__); } |