mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 22:26:06 +00:00
Avoid use of UMA_HISTOGRAM_COUNTS
UMA_HISTOGRAM_COUNTS is documented as deprecated and defaults to creating larger histograms than are needed by Crashpad. Bug: chromium:1237013 Change-Id: Ic133e05bce41759a11dbb523d84afc5246c6dc37 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3075884 Commit-Queue: Joshua Peraza <jperaza@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
7451893cd8
commit
1db7e2b547
@ -37,18 +37,23 @@ namespace {
|
|||||||
|
|
||||||
//! \brief Metrics values used to track the start and completion of a crash
|
//! \brief Metrics values used to track the start and completion of a crash
|
||||||
//! handling. These are used as metrics values directly, so
|
//! handling. These are used as metrics values directly, so
|
||||||
//! enumeration values so new values should always be added at the end.
|
//! enumeration values so new values should always be added at the end,
|
||||||
|
//! before kMaxValue.
|
||||||
enum class ExceptionProcessingState {
|
enum class ExceptionProcessingState {
|
||||||
//! \brief Logged when exception processing is started.
|
//! \brief Logged when exception processing is started.
|
||||||
kStarted = 0,
|
kStarted = 0,
|
||||||
|
|
||||||
//! \brief Logged when exception processing completes.
|
//! \brief Logged when exception processing completes.
|
||||||
kFinished = 1,
|
kFinished = 1,
|
||||||
|
|
||||||
|
//! \brief An invalid value.
|
||||||
|
kMaxValue,
|
||||||
};
|
};
|
||||||
|
|
||||||
void ExceptionProcessing(ExceptionProcessingState state) {
|
void ExceptionProcessing(ExceptionProcessingState state) {
|
||||||
UMA_HISTOGRAM_COUNTS("Crashpad.ExceptionEncountered",
|
UMA_HISTOGRAM_ENUMERATION("Crashpad.ExceptionEncountered",
|
||||||
static_cast<int32_t>(state));
|
state,
|
||||||
|
ExceptionProcessingState::kMaxValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
@ -70,7 +75,7 @@ void Metrics::CrashReportSize(FileOffset size) {
|
|||||||
|
|
||||||
// static
|
// static
|
||||||
void Metrics::CrashUploadAttempted(bool successful) {
|
void Metrics::CrashUploadAttempted(bool successful) {
|
||||||
UMA_HISTOGRAM_COUNTS("Crashpad.CrashUpload.AttemptSuccessful", successful);
|
UMA_HISTOGRAM_BOOLEAN("Crashpad.CrashUpload.AttemptSuccessful", successful);
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
Loading…
x
Reference in New Issue
Block a user