Adds WebRTC.DesktopCapture.Win.DirectXCapturerResult UMA
This records high level errors, or success, encountered across the entire capture flow in the DXGI based capturer. Using the same style as for WebRTC.DesktopCapture.Win.WgcCapturerResult Bug: chromium:1400204 Change-Id: I7096d1790d7c2a23bbe29761b7dbf40426ce1e6a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291707 Reviewed-by: Alexander Cooper <alcooper@chromium.org> Commit-Queue: Henrik Andreassson <henrika@webrtc.org> Cr-Commit-Position: refs/heads/main@{#39259}
This commit is contained in:
parent
fd29662c61
commit
b0e1cb254e
@ -64,13 +64,17 @@ class RTC_EXPORT DxgiDuplicatorController {
|
||||
// version.
|
||||
};
|
||||
|
||||
// These values are persisted to logs. Entries should not be renumbered or
|
||||
// reordered and numeric values should never be reused. This enum corresponds
|
||||
// to WebRtcDirectXCapturerResult in tools/metrics/histograms/enums.xml.
|
||||
enum class Result {
|
||||
SUCCEEDED,
|
||||
UNSUPPORTED_SESSION,
|
||||
FRAME_PREPARE_FAILED,
|
||||
INITIALIZATION_FAILED,
|
||||
DUPLICATION_FAILED,
|
||||
INVALID_MONITOR_ID,
|
||||
SUCCEEDED = 0,
|
||||
UNSUPPORTED_SESSION = 1,
|
||||
FRAME_PREPARE_FAILED = 2,
|
||||
INITIALIZATION_FAILED = 3,
|
||||
DUPLICATION_FAILED = 4,
|
||||
INVALID_MONITOR_ID = 5,
|
||||
MAX_VALUE = INVALID_MONITOR_ID
|
||||
};
|
||||
|
||||
// Converts `result` into user-friendly string representation. The return
|
||||
|
||||
@ -151,6 +151,10 @@ void ScreenCapturerWinDirectx::CaptureFrame() {
|
||||
"error code "
|
||||
<< DxgiDuplicatorController::ResultName(result);
|
||||
}
|
||||
RTC_HISTOGRAM_ENUMERATION(
|
||||
"WebRTC.DesktopCapture.Win.DirectXCapturerResult",
|
||||
static_cast<int>(result),
|
||||
static_cast<int>(DxgiDuplicatorController::Result::MAX_VALUE));
|
||||
switch (result) {
|
||||
case DuplicateResult::UNSUPPORTED_SESSION: {
|
||||
RTC_LOG(LS_ERROR)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user