Index: webrtc/modules/audio_processing/residual_echo_detector.cc |
diff --git a/webrtc/modules/audio_processing/residual_echo_detector.cc b/webrtc/modules/audio_processing/residual_echo_detector.cc |
index ff59dc2f5b0c1cd537aa76670b2b12b121854b5f..61cfce96a95d97e1d0007b759829d1d38de85968 100644 |
--- a/webrtc/modules/audio_processing/residual_echo_detector.cc |
+++ b/webrtc/modules/audio_processing/residual_echo_detector.cc |
@@ -14,6 +14,7 @@ |
#include <numeric> |
#include "webrtc/modules/audio_processing/audio_buffer.h" |
+#include "webrtc/system_wrappers/include/metrics.h" |
namespace { |
@@ -24,6 +25,8 @@ float Power(rtc::ArrayView<const float> input) { |
constexpr size_t kLookbackFrames = 650; |
// TODO(ivoc): Verify the size of this buffer. |
constexpr size_t kRenderBufferSize = 30; |
+// Number of bins in the echo likelihood histogram. |
+constexpr size_t kNumberOfHistogramBins = 100; |
} // namespace |
@@ -99,6 +102,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, kNumberOfHistogramBins); |
hlundin-webrtc
2016/11/09 20:01:26
I'm not convinced that kNumberOfHistogramBins gran
ivoc
2016/11/10 15:13:47
Done.
|
// Update the next insertion index. |
++next_insertion_index_; |