Reland of 'Bug in histogram metric reporting.'

Original CL: https://webrtc-review.googlesource.com/c/src/+/101340

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 inverts the value
logged. The noise level value should be somewhere between -90 and 0
dBFS.

The histogram description is updated in
https://chromium-review.googlesource.com/c/chromium/src/+/1264578

Bug: webrtc:7494
Change-Id: I0b53630d4284ce1078fd453e05e89ee53ca9f6c7
Reviewed-on: https://webrtc-review.googlesource.com/c/104063
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25021}
This commit is contained in:
Alex Loiko 2018-10-05 13:49:33 +02:00 committed by Commit Bot
parent e28dedf100
commit f2637a8d6f

View file

@ -100,7 +100,7 @@ void AdaptiveDigitalGainApplier::Process(SignalWithLevels signal_with_levels) {
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",
signal_with_levels.input_noise_level_dbfs, 0, -signal_with_levels.input_noise_level_dbfs, 0,
100, 101); 100, 101);
} }