summaryrefslogtreecommitdiffstats
path: root/media/audio/audio_input_controller.cc
diff options
context:
space:
mode:
authordalecurtis@chromium.org <dalecurtis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-16 02:05:03 +0000
committerdalecurtis@chromium.org <dalecurtis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-16 02:05:03 +0000
commit6c0c5b1a4af33c488ace8b19efe987c66990f76d (patch)
treece66221b212084e3e75366037a84280ac4e6852a /media/audio/audio_input_controller.cc
parent47cb253f15ca0e9dfcef8dd4b42bb5bc443c522f (diff)
downloadchromium_src-6c0c5b1a4af33c488ace8b19efe987c66990f76d.zip
chromium_src-6c0c5b1a4af33c488ace8b19efe987c66990f76d.tar.gz
chromium_src-6c0c5b1a4af33c488ace8b19efe987c66990f76d.tar.bz2
Report timing statistics for audio controller methods via UMA.
Logs the time taken to execute the main methods of AudioInputController and AudioOutputController. This timing information will be used to determine if we can combine the audio thread and the UI thread on OSX to (hopefully) fix http://crbug.com/158170. BUG=158170 TEST=chrome://histograms/Media.Audio contains information. Review URL: https://chromiumcodereview.appspot.com/14827002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200414 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/audio/audio_input_controller.cc')
-rw-r--r--media/audio/audio_input_controller.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/media/audio/audio_input_controller.cc b/media/audio/audio_input_controller.cc
index 2e408db..d70c706 100644
--- a/media/audio/audio_input_controller.cc
+++ b/media/audio/audio_input_controller.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/threading/thread_restrictions.h"
#include "media/base/limits.h"
+#include "media/base/scoped_histogram_timer.h"
namespace {
const int kMaxInputChannels = 2;
@@ -168,6 +169,7 @@ void AudioInputController::DoCreate(AudioManager* audio_manager,
const AudioParameters& params,
const std::string& device_id) {
DCHECK(message_loop_->BelongsToCurrentThread());
+ SCOPED_UMA_HISTOGRAM_TIMER("Media.AudioInputController.CreateTime");
// TODO(miu): See TODO at top of file. Until that's resolved, assume all
// platform audio input requires the |no_data_timer_| be used to auto-detect
// errors. In reality, probably only Windows and IOS need to be treated as
@@ -214,6 +216,7 @@ void AudioInputController::DoCreateForStream(
void AudioInputController::DoRecord() {
DCHECK(message_loop_->BelongsToCurrentThread());
+ SCOPED_UMA_HISTOGRAM_TIMER("Media.AudioInputController.RecordTime");
if (state_ != kCreated)
return;
@@ -235,6 +238,7 @@ void AudioInputController::DoRecord() {
void AudioInputController::DoClose() {
DCHECK(message_loop_->BelongsToCurrentThread());
+ SCOPED_UMA_HISTOGRAM_TIMER("Media.AudioInputController.CloseTime");
// Delete the timer on the same thread that created it.
no_data_timer_.reset();