Switch to use new implementation in metrics.h for gathering statistics.
Sparse macro replaced for all audio histograms that have a constant name.
BUG=webrtc:5283
Review URL: https://codereview.webrtc.org/1762863003
Cr-Commit-Position: refs/heads/master@{#11885}
diff --git a/webrtc/modules/audio_processing/audio_processing_impl.cc b/webrtc/modules/audio_processing/audio_processing_impl.cc
index 9c587c2..a7c120f 100644
--- a/webrtc/modules/audio_processing/audio_processing_impl.cc
+++ b/webrtc/modules/audio_processing/audio_processing_impl.cc
@@ -1282,9 +1282,8 @@
capture_nonlocked_.stream_delay_ms - capture_.last_stream_delay_ms;
if (diff_stream_delay_ms > kMinDiffDelayMs &&
capture_.last_stream_delay_ms != 0) {
- RTC_HISTOGRAM_COUNTS_SPARSE(
- "WebRTC.Audio.PlatformReportedStreamDelayJump", diff_stream_delay_ms,
- kMinDiffDelayMs, 1000, 100);
+ RTC_HISTOGRAM_COUNTS("WebRTC.Audio.PlatformReportedStreamDelayJump",
+ diff_stream_delay_ms, kMinDiffDelayMs, 1000, 100);
if (capture_.stream_delay_jumps == -1) {
capture_.stream_delay_jumps = 0; // Activate counter if needed.
}
@@ -1303,9 +1302,9 @@
aec_system_delay_ms - capture_.last_aec_system_delay_ms;
if (diff_aec_system_delay_ms > kMinDiffDelayMs &&
capture_.last_aec_system_delay_ms != 0) {
- RTC_HISTOGRAM_COUNTS_SPARSE("WebRTC.Audio.AecSystemDelayJump",
- diff_aec_system_delay_ms, kMinDiffDelayMs,
- 1000, 100);
+ RTC_HISTOGRAM_COUNTS("WebRTC.Audio.AecSystemDelayJump",
+ diff_aec_system_delay_ms, kMinDiffDelayMs, 1000,
+ 100);
if (capture_.aec_system_delay_jumps == -1) {
capture_.aec_system_delay_jumps = 0; // Activate counter if needed.
}
@@ -1321,7 +1320,7 @@
rtc::CritScope cs_capture(&crit_capture_);
if (capture_.stream_delay_jumps > -1) {
- RTC_HISTOGRAM_ENUMERATION_SPARSE(
+ RTC_HISTOGRAM_ENUMERATION(
"WebRTC.Audio.NumOfPlatformReportedStreamDelayJumps",
capture_.stream_delay_jumps, 51);
}
@@ -1329,8 +1328,8 @@
capture_.last_stream_delay_ms = 0;
if (capture_.aec_system_delay_jumps > -1) {
- RTC_HISTOGRAM_ENUMERATION_SPARSE("WebRTC.Audio.NumOfAecSystemDelayJumps",
- capture_.aec_system_delay_jumps, 51);
+ RTC_HISTOGRAM_ENUMERATION("WebRTC.Audio.NumOfAecSystemDelayJumps",
+ capture_.aec_system_delay_jumps, 51);
}
capture_.aec_system_delay_jumps = -1;
capture_.last_aec_system_delay_ms = 0;