summaryrefslogtreecommitdiff
path: root/system/common/metrics.cc
diff options
context:
space:
mode:
author Josh Wu <joshwu@google.com> 2022-06-27 17:25:02 +0800
committer Jakub Tyszkowski <tyszkowski@google.com> 2022-08-24 10:05:57 +0000
commit181394f29e966ac590ad5913e41251f183c19c5e (patch)
tree56500ad6e3a4aad03cd9614846731fba1f3787dc /system/common/metrics.cc
parent207b3e4552e7f44f147ce5d99aa01f2deb56a6e0 (diff)
Add LeAudioBroadcastSession
* Add Broadcast methods to MetricsCollector * Implement LogLeAudioBroadcastSessionReported logging API * Add Broadcast cases to MetricsCollectorTest Test: atest BluetoothInstrumentationTests Tag: #feature Bug: 207811438 Change-Id: I9858d3841de7e3244acc3ff62efe2e497b08899a Merged-In: I9858d3841de7e3244acc3ff62efe2e497b08899a (cherry picked from commit 4cb702cc4e4d6614b08960245b41f6bee599029f)
Diffstat (limited to 'system/common/metrics.cc')
-rw-r--r--system/common/metrics.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/system/common/metrics.cc b/system/common/metrics.cc
index 0664186cac..baf838b0c4 100644
--- a/system/common/metrics.cc
+++ b/system/common/metrics.cc
@@ -962,6 +962,13 @@ void LogLeAudioConnectionSessionReported(
}
}
+void LogLeAudioBroadcastSessionReported(int64_t duration_nanos) {
+ int ret = stats_write(LE_AUDIO_BROADCAST_SESSION_REPORTED, duration_nanos);
+ if (ret < 0) {
+ LOG(WARNING) << __func__ << ": failed for duration=" << duration_nanos;
+ }
+}
+
} // namespace common
} // namespace bluetooth