mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
UMA changes based on Chromium-side review
Per comments in https://codereview.chromium.org/2350943003/: - Increase the upper bound for Crashpad.CrashReportSize to 20M - Make ExceptionEncountered a 2 enum bucket to track start/end. R=asvitkine@chromium.org, mark@chromium.org BUG=crashpad:100 Change-Id: Ie848b2e3744c58f6d669986d3e78e7391b0e9e68 Reviewed-on: https://chromium-review.googlesource.com/387685 Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
007f790fe2
commit
0aeca5f123
@ -20,15 +20,36 @@
|
||||
|
||||
namespace crashpad {
|
||||
|
||||
namespace {
|
||||
|
||||
//! \brief Metrics values used to track the start and completion of a crash
|
||||
//! handling. These are used as metrics values directly, so
|
||||
//! enumeration values so new values should always be added at the end.
|
||||
enum class ExceptionProcessingState {
|
||||
//! \brief Logged when exception processing is started.
|
||||
kStarted = 0,
|
||||
|
||||
//! \brief Logged when exception processing completes.
|
||||
kFinished = 1,
|
||||
};
|
||||
|
||||
void ExceptionProcessing(ExceptionProcessingState state) {
|
||||
UMA_HISTOGRAM_COUNTS("Crashpad.ExceptionEncountered",
|
||||
static_cast<int>(state));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
// static
|
||||
void Metrics::CrashReportSize(FileHandle file) {
|
||||
const FileOffset size = LoggingFileSizeByHandle(file);
|
||||
UMA_HISTOGRAM_CUSTOM_COUNTS(
|
||||
"Crashpad.CrashReportSize", size, 0, 5 * 1024 * 1024, 50);
|
||||
"Crashpad.CrashReportSize", size, 0, 20 * 1024 * 1024, 50);
|
||||
}
|
||||
|
||||
// static
|
||||
void Metrics::ExceptionCaptureResult(CaptureResult result) {
|
||||
ExceptionProcessing(ExceptionProcessingState::kFinished);
|
||||
UMA_HISTOGRAM_ENUMERATION("Crashpad.ExceptionCaptureResult",
|
||||
static_cast<int32_t>(result),
|
||||
static_cast<int32_t>(CaptureResult::kMaxValue));
|
||||
@ -47,7 +68,7 @@ void Metrics::ExceptionCode(uint32_t exception_code) {
|
||||
|
||||
// static
|
||||
void Metrics::ExceptionEncountered() {
|
||||
UMA_HISTOGRAM_COUNTS("Crashpad.ExceptionEncountered", 1);
|
||||
ExceptionProcessing(ExceptionProcessingState::kStarted);
|
||||
}
|
||||
|
||||
} // namespace crashpad
|
||||
|
@ -71,7 +71,7 @@ class Metrics {
|
||||
};
|
||||
|
||||
//! \brief Reports on the outcome of capturing a report in the exception
|
||||
//! handler.
|
||||
//! handler. Should be called on all capture completion paths.
|
||||
static void ExceptionCaptureResult(CaptureResult result);
|
||||
|
||||
//! \brief The exception code for an exception was retrieved.
|
||||
|
Loading…
x
Reference in New Issue
Block a user