Bug in histogram metric reporting.

A (actually several weeks) while ago, we noticed an error with the
WebRTC.Audio.Agc2.EstimatedNoiseLevel histogram. It always reported
the value 0. Here is why:

The histogram bins go from 0 to 100. But the value logged is dBFS. It is
always less than or equal to 0. This CL changes the bins.

Bug: webrtc:7494
Change-Id: I45fd122e98f9396f9871bc965a708987bd1815f6
Reviewed-on: https://webrtc-review.googlesource.com/101340
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24800}
This commit is contained in:
Alex Loiko
2018-09-21 15:41:27 +02:00
committed by Commit Bot
parent 8a876c9067
commit 3a9731ff2f

View File

@ -83,7 +83,7 @@ void AdaptiveDigitalGainApplier::Process(
RTC_HISTOGRAM_COUNTS_LINEAR("WebRTC.Audio.Agc2.DigitalGainApplied", RTC_HISTOGRAM_COUNTS_LINEAR("WebRTC.Audio.Agc2.DigitalGainApplied",
last_gain_db_, 0, kMaxGainDb, kMaxGainDb + 1); last_gain_db_, 0, kMaxGainDb, kMaxGainDb + 1);
RTC_HISTOGRAM_COUNTS_LINEAR("WebRTC.Audio.Agc2.EstimatedNoiseLevel", RTC_HISTOGRAM_COUNTS_LINEAR("WebRTC.Audio.Agc2.EstimatedNoiseLevel",
input_noise_level_dbfs, 0, 100, 101); input_noise_level_dbfs, -100, 0, 101);
} }
input_level_dbfs = std::min(input_level_dbfs, 0.f); input_level_dbfs = std::min(input_level_dbfs, 0.f);