Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1002)

Unified Diff: content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc

Issue 1179803002: Add UMA entry for VaapiJpegDecodeAccelerator errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mjpeg-2-gpu
Patch Set: rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc
diff --git a/content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc b/content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc
index fc0d90eccc311c64ee330c4411998097aac47bca..6d51d27f52636b67b6fec665357fca2dae890bbd 100644
--- a/content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc
+++ b/content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/logging.h"
+#include "base/metrics/histogram.h"
#include "base/thread_task_runner_handle.h"
#include "base/trace_event/trace_event.h"
#include "content/common/gpu/gpu_channel.h"
@@ -17,8 +18,15 @@
namespace content {
namespace {
-static void ReportVaapiError() {
- // TODO(kcwu) report error to UMA
+// UMA errors that the VaapiJpegDecodeAccelerator class reports.
+enum VAJDADecoderFailure {
+ VAAPI_ERROR = 0,
+ VAJDA_DECODER_FAILURES_MAX,
+};
+
+static void ReportToUMA(VAJDADecoderFailure failure) {
+ UMA_HISTOGRAM_ENUMERATION("Media.VAJDA.DecoderFailure", failure,
+ VAJDA_DECODER_FAILURES_MAX);
}
} // namespace
@@ -81,7 +89,7 @@ bool VaapiJpegDecodeAccelerator::Initialize(Client* client) {
vaapi_wrapper_ =
VaapiWrapper::Create(VaapiWrapper::kDecode, VAProfileJPEGBaseline,
- base::Bind(&ReportVaapiError));
+ base::Bind(&ReportToUMA, VAAPI_ERROR));
if (!vaapi_wrapper_.get()) {
DLOG(ERROR) << "Failed initializing VAAPI";
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698