Add UMA histogram for Echo likelihood.

The likelihood is logged as a percentage, with 100 bins in the histogram.

BUG=webrtc:6525

Review-Url: https://codereview.webrtc.org/2487243002
Cr-Commit-Position: refs/heads/master@{#15025}
This commit is contained in:
ivoc 2016-11-10 08:21:04 -08:00 committed by Commit bot
parent 44c7ecf88e
commit ef6cbae756

View File

@ -14,6 +14,7 @@
#include <numeric>
#include "webrtc/modules/audio_processing/audio_buffer.h"
#include "webrtc/system_wrappers/include/metrics.h"
namespace {
@ -99,6 +100,9 @@ void ResidualEchoDetector::AnalyzeCaptureAudio(
echo_likelihood_ = std::max(
echo_likelihood_, covariances_[delay].normalized_cross_correlation());
}
int echo_percentage = static_cast<int>(echo_likelihood_ * 100);
RTC_HISTOGRAM_COUNTS("WebRTC.Audio.ResidualEchoDetector.EchoLikelihood",
echo_percentage, 0, 100, 100 /* number of bins */);
// Update the next insertion index.
++next_insertion_index_;