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}
This commit is contained in:
asapersson
2016-03-07 01:52:59 -08:00
committed by Commit bot
parent 7620be8492
commit a2c58e2198
2 changed files with 11 additions and 12 deletions

View File

@ -1282,9 +1282,8 @@ void AudioProcessingImpl::MaybeUpdateHistograms() {
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 @@ void AudioProcessingImpl::MaybeUpdateHistograms() {
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 @@ void AudioProcessingImpl::UpdateHistogramsOnCallEnd() {
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 @@ void AudioProcessingImpl::UpdateHistogramsOnCallEnd() {
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;