From b9a02e523c5564c7b0fcee6153a492634e887eff Mon Sep 17 00:00:00 2001 From: Alex Loiko Date: Mon, 19 Mar 2018 14:32:05 +0100 Subject: [PATCH] Change place of UMA logging in AudioMixer. And fix typo in UMA metric. We have this pattern in the FrameCombiner component of the AudioMixer: if (number_of_streams <= 1) { // Copy or fill with zeros. return; } // Mix and limit LogMixingStats(/* args */); When there is only one remote stream, info about active streams and sample rate is not logged. This CL moves the call to log stats before the 'return'. Bug: webrtc:8925 Change-Id: I7b54f61f628273631909dafbfafa21e155e18d4a Reviewed-on: https://webrtc-review.googlesource.com/62860 Reviewed-by: Alessio Bazzica Commit-Queue: Alex Loiko Cr-Commit-Position: refs/heads/master@{#22493} --- modules/audio_mixer/frame_combiner.cc | 5 +++-- modules/audio_processing/agc2/interpolated_gain_curve.cc | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/audio_mixer/frame_combiner.cc b/modules/audio_mixer/frame_combiner.cc index 2c83e2e0b7..24a5453d6f 100644 --- a/modules/audio_mixer/frame_combiner.cc +++ b/modules/audio_mixer/frame_combiner.cc @@ -215,6 +215,9 @@ void FrameCombiner::Combine(const std::vector& mix_list, size_t number_of_streams, AudioFrame* audio_frame_for_mixing) { RTC_DCHECK(audio_frame_for_mixing); + + LogMixingStats(mix_list, sample_rate, number_of_streams); + SetAudioFrameFields(mix_list, number_of_channels, sample_rate, number_of_streams, audio_frame_for_mixing); @@ -255,8 +258,6 @@ void FrameCombiner::Combine(const std::vector& mix_list, } InterleaveToAudioFrame(mixing_buffer_view, audio_frame_for_mixing); - - LogMixingStats(mix_list, sample_rate, number_of_streams); } void FrameCombiner::LogMixingStats(const std::vector& mix_list, diff --git a/modules/audio_processing/agc2/interpolated_gain_curve.cc b/modules/audio_processing/agc2/interpolated_gain_curve.cc index 69602b5919..aac533d83f 100644 --- a/modules/audio_processing/agc2/interpolated_gain_curve.cc +++ b/modules/audio_processing/agc2/interpolated_gain_curve.cc @@ -21,7 +21,7 @@ namespace { void LogRegionStats(const InterpolatedGainCurve::Stats& stats) { using Region = InterpolatedGainCurve::GainCurveRegion; - std::string histogram_name = "WebRTC.Audio.AGC2.FixedDigitalGainCurveRegion."; + std::string histogram_name = "WebRTC.Audio.Agc2.FixedDigitalGainCurveRegion."; if (stats.region == Region::kIdentity) { histogram_name += "Identity"; } else if (stats.region == Region::kKnee) {