Add more Audio Mixer and Fixed Gain Controller metrics.

We want to know how the AudioMixer is used and how FixedGainController
behaves.

The WebRTC.Audio.Agc2.FixedDigitalGainCurveRegion.* metrics measures
how often the input level hits different regions of the Fixed Gain
Controller gain curve (when the limiter is enabled). They also measure
how long the metrics stay in different regions. They are related to
WebRTC.Audio.ApmCaptureOutputLevelPeakRms, but the new metrics measure
the level before any processing done in APM.

The AudioMixer mixes incoming audio streams. Their number should be
mostly constant, and often some of them could be muted. The metrics
WebRTC.Audio.AudioMixer.NumIncomingStreams,
WebRTC.Audio.AudioMixer.NumIncomingActiveStreams log the number of
incoming stream and how many are not muted. We currently don't have
any stats related to that.

The metric WebRTC.Audio.AudioMixer.MixingRate logs the rate selected
for mixing. The rate can sometimes be inferred from
WebRTC.Audio.Encoder.CodecType. But that metric measures encoding and
not decoding, and codecs don't always map to rates.

See also accompanying Chromium CL
https://chromium-review.googlesource.com/c/chromium/src/+/939473

Bug: webrtc:8925
Change-Id: Ib1405877fc1b39e5d2f0ceccba04434813f20b0d
Reviewed-on: https://webrtc-review.googlesource.com/57740
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22443}
diff --git a/modules/audio_mixer/frame_combiner.h b/modules/audio_mixer/frame_combiner.h
index 3d43128..14257d2 100644
--- a/modules/audio_mixer/frame_combiner.h
+++ b/modules/audio_mixer/frame_combiner.h
@@ -44,10 +44,15 @@
                AudioFrame* audio_frame_for_mixing);
 
  private:
+  void LogMixingStats(const std::vector<AudioFrame*>& mix_list,
+                      int sample_rate,
+                      size_t number_of_streams) const;
+
   LimiterType limiter_type_;
   std::unique_ptr<AudioProcessing> apm_agc_limiter_;
   std::unique_ptr<ApmDataDumper> data_dumper_;
   FixedGainController apm_agc2_limiter_;
+  mutable int uma_logging_counter_ = 0;
 };
 }  // namespace webrtc