Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2104)

Unified Diff: webrtc/modules/audio_processing/residual_echo_detector.cc

Issue 2487243002: Add UMA histogram for Echo likelihood. (Closed)
Patch Set: Initial version. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698