Reland of APM: Change 3 UMA metrics to fewer but linearly distributed buckets (patchset #1 id:1 of https://codereview.webrtc.org/2548333002/ )

Reason for revert:
The downstream problem is now fixed, and this should be good to land again.

Original issue's description:
> Revert of APM: Change 3 UMA metrics to fewer but linearly distributed buckets (patchset #2 id:20001 of https://codereview.webrtc.org/2547593002/ )
>
> Reason for revert:
> Breaks down-stream dependencies.
>
> Original issue's description:
> > APM: Change 3 UMA metrics to fewer but linearly distributed buckets
> >
> > In this change WebRTC.Audio.ApmCaptureInputLevel{Average,Peak} are
> > changed to 64 buckets, while WebRTC.Audio.AgcLevel is changed to 50
> > buckets. All three are changed to have linear spacing between buckets.
> >
> > Also, the metrics are renamed to avoid stats conflicts because of different bucket schemes:
> > - WebRTC.Audio.AgcLevel -> WebRTC.Audio.AgcSetLevel
> > - WebRTC.Audio.ApmCaptureInputLevelAverage -> WebRTC.Audio.ApmCaptureInputLevelAverageRms
> > - WebRTC.Audio.ApmCaptureInputLevelPeakRms -> WebRTC.Audio.ApmCaptureInputLevelPeakRms
> >
> > BUG=webrtc:6622
> > CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_rel_ng
> >
> > Committed: https://crrev.com/49715fe3be17d8579586d5bc954d626126d53415
> > Cr-Commit-Position: refs/heads/master@{#15418}
>
> TBR=peah@webrtc.org,rkaplow@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6622
>
> Committed: https://crrev.com/63407a9b6ae6f3fc096e01d64e46c6d21d86b517
> Cr-Commit-Position: refs/heads/master@{#15420}

TBR=peah@webrtc.org,rkaplow@chromium.org
BUG=webrtc:6622
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_rel_ng

Review-Url: https://codereview.webrtc.org/2551863003
Cr-Commit-Position: refs/heads/master@{#15442}
This commit is contained in:
henrik.lundin 2016-12-06 04:28:04 -08:00 committed by Commit bot
parent 243a0a7a7f
commit 45bb5130b0
2 changed files with 6 additions and 5 deletions

View File

@ -413,7 +413,8 @@ void AgcManagerDirect::UpdateGain() {
SetLevel(LevelFromGainError(residual_gain, level_));
if (old_level != level_) {
// level_ was updated by SetLevel; log the new value.
RTC_HISTOGRAM_ENUMERATION("WebRTC.Audio.AgcLevel", level_, kMaxMicLevel);
RTC_HISTOGRAM_COUNTS_LINEAR("WebRTC.Audio.AgcSetLevel", level_, 1,
kMaxMicLevel, 50);
}
}

View File

@ -1102,10 +1102,10 @@ int AudioProcessingImpl::ProcessCaptureStreamLocked() {
if (++rms_interval_counter_ >= 1000) {
rms_interval_counter_ = 0;
RmsLevel::Levels levels = rms_.AverageAndPeak();
RTC_HISTOGRAM_COUNTS("WebRTC.Audio.ApmCaptureInputLevelAverage",
levels.average, 1, RmsLevel::kMinLevelDb, 100);
RTC_HISTOGRAM_COUNTS("WebRTC.Audio.ApmCaptureInputLevelPeak", levels.peak,
1, RmsLevel::kMinLevelDb, 100);
RTC_HISTOGRAM_COUNTS_LINEAR("WebRTC.Audio.ApmCaptureInputLevelAverageRms",
levels.average, 1, RmsLevel::kMinLevelDb, 64);
RTC_HISTOGRAM_COUNTS_LINEAR("WebRTC.Audio.ApmCaptureInputLevelPeakRms",
levels.peak, 1, RmsLevel::kMinLevelDb, 64);
}
if (constants_.use_experimental_agc &&