From 7451893cd80b22170c23e172a9dd0e280ed15560 Mon Sep 17 00:00:00 2001 From: Justin Cohen Date: Fri, 16 Jul 2021 15:23:48 -0400 Subject: [PATCH] ios: Fix MissingIntermediateDumpKey and InvalidIntermediateDumpKeySize histogram. The actual number of enums that will be recorded is approx ~75. Bug: crashpad: 31 Change-Id: If33671c7627d6e55e94c86308c8482711e33cef4 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3035823 Reviewed-by: Mark Mentovai Commit-Queue: Justin Cohen --- util/misc/metrics.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/util/misc/metrics.cc b/util/misc/metrics.cc index d45fad65..59a392cf 100644 --- a/util/misc/metrics.cc +++ b/util/misc/metrics.cc @@ -114,17 +114,15 @@ void Metrics::HandlerCrashed(uint32_t exception_code) { // static void Metrics::MissingIntermediateDumpKey( const internal::IntermediateDumpKey& key) { - UMA_HISTOGRAM_ENUMERATION("Crashpad.IntermediateDump.Reader.MissingKey", - key, - internal::IntermediateDumpKey::kMaxValue); + base::UmaHistogramSparse("Crashpad.IntermediateDump.Reader.MissingKey", + static_cast(key)); } // static void Metrics::InvalidIntermediateDumpKeySize( const internal::IntermediateDumpKey& key) { - UMA_HISTOGRAM_ENUMERATION("Crashpad.IntermediateDump.Reader.InvalidKeySize", - key, - internal::IntermediateDumpKey::kMaxValue); + base::UmaHistogramSparse("Crashpad.IntermediateDump.Reader.InvalidKeySize", + static_cast(key)); } #endif