Commit 30fceda0 authored by Raymond Toy's avatar Raymond Toy Committed by Commit Bot

Measure length of impulse responses for ConvolverNode

Add time histogram to measure the length of the impulse response for a
ConvolverNode.

Bug: 998154
Change-Id: I8167cbfe51edea0e072ad571095c6f11d5b12526
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1773418
Commit-Queue: Raymond Toy <rtoy@chromium.org>
Reviewed-by: default avatarMark Pearson <mpearson@chromium.org>
Reviewed-by: default avatarHongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#701679}
parent 87fffee7
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "third_party/blink/renderer/modules/webaudio/convolver_options.h" #include "third_party/blink/renderer/modules/webaudio/convolver_options.h"
#include "third_party/blink/renderer/platform/audio/reverb.h" #include "third_party/blink/renderer/platform/audio/reverb.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h" #include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/instrumentation/histogram.h"
// Note about empirical tuning: // Note about empirical tuning:
// The maximum FFT size affects reverb performance and accuracy. // The maximum FFT size affects reverb performance and accuracy.
...@@ -134,6 +135,12 @@ void ConvolverHandler::SetBuffer(AudioBuffer* buffer, ...@@ -134,6 +135,12 @@ void ConvolverHandler::SetBuffer(AudioBuffer* buffer,
return; return;
} }
{
// Get some statistics on the size of the impulse response.
UMA_HISTOGRAM_LONG_TIMES("WebAudio.ConvolverNode.ImpulseResponseLength",
base::TimeDelta::FromSecondsD(buffer->duration()));
}
// Wrap the AudioBuffer by an AudioBus. It's an efficient pointer set and not // Wrap the AudioBuffer by an AudioBus. It's an efficient pointer set and not
// a memcpy(). This memory is simply used in the Reverb constructor and no // a memcpy(). This memory is simply used in the Reverb constructor and no
// reference to it is kept for later use in that class. // reference to it is kept for later use in that class.
......
...@@ -155804,6 +155804,16 @@ regressions. --> ...@@ -155804,6 +155804,16 @@ regressions. -->
</summary> </summary>
</histogram> </histogram>
<histogram name="WebAudio.ConvolverNode.ImpulseResponseLength" units="ms"
expires_after="M82">
<owner>rtoy@chromium.org</owner>
<owner>hongchan@chromium.org</owner>
<summary>
The duration in millisec of impulse responses for a ConvolverNode. Recorded
each time the impulse response is set for a ConvolverNode.
</summary>
</histogram>
<histogram name="WebAudio.IIRFilterNode.Order" units="units" <histogram name="WebAudio.IIRFilterNode.Order" units="units"
expires_after="M81"> expires_after="M81">
<owner>rtoy@chromium.org</owner> <owner>rtoy@chromium.org</owner>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment