Add UMA counter for audio interruptions

The metric is added to Chromium histograms in
https://chromium-review.googlesource.com/c/chromium/src/+/1925066.

Bug: webrtc:10549
Change-Id: I2bf98f469547aa8621832fc4f8bd29c4805ac0b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160045
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29854}
This commit is contained in:
Henrik Lundin
2019-11-21 09:34:29 +01:00
committed by Commit Bot
parent c4e506ebdf
commit e835fc01b1

View File

@ -193,6 +193,8 @@ void StatisticsCalculator::EndExpandEvent(int fs_hz) {
if (event_duration_ms >= kInterruptionLenMs && decoded_output_played_) {
lifetime_stats_.interruption_count++;
lifetime_stats_.total_interruption_duration_ms += event_duration_ms;
RTC_HISTOGRAM_COUNTS("WebRTC.Audio.AudioInterruptionMs", event_duration_ms,
/*min=*/150, /*max=*/5000, /*bucket_count=*/50);
}
concealed_samples_at_event_end_ = lifetime_stats_.concealed_samples;
}