OLD | NEW |
1 // Copyright 2016 The Crashpad Authors. All rights reserved. | 1 // Copyright 2016 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 void Metrics::ExceptionCode(uint32_t exception_code) { | 91 void Metrics::ExceptionCode(uint32_t exception_code) { |
92 UMA_HISTOGRAM_SPARSE_SLOWLY("Crashpad.ExceptionCode." METRICS_OS_NAME, | 92 UMA_HISTOGRAM_SPARSE_SLOWLY("Crashpad.ExceptionCode." METRICS_OS_NAME, |
93 static_cast<int32_t>(exception_code)); | 93 static_cast<int32_t>(exception_code)); |
94 } | 94 } |
95 | 95 |
96 // static | 96 // static |
97 void Metrics::ExceptionEncountered() { | 97 void Metrics::ExceptionEncountered() { |
98 ExceptionProcessing(ExceptionProcessingState::kStarted); | 98 ExceptionProcessing(ExceptionProcessingState::kStarted); |
99 } | 99 } |
100 | 100 |
| 101 // static |
| 102 void Metrics::HandlerLifetimeMilestone(LifetimeMilestone milestone) { |
| 103 UMA_HISTOGRAM_ENUMERATION("Crashpad.HandlerLifetimeMilestone", |
| 104 static_cast<int32_t>(milestone), |
| 105 static_cast<int32_t>(LifetimeMilestone::kMaxValue)); |
| 106 } |
| 107 |
| 108 // static |
101 void Metrics::HandlerCrashed(uint32_t exception_code) { | 109 void Metrics::HandlerCrashed(uint32_t exception_code) { |
102 UMA_HISTOGRAM_SPARSE_SLOWLY( | 110 UMA_HISTOGRAM_SPARSE_SLOWLY( |
103 "Crashpad.HandlerCrash.ExceptionCode." METRICS_OS_NAME, | 111 "Crashpad.HandlerCrash.ExceptionCode." METRICS_OS_NAME, |
104 static_cast<int32_t>(exception_code)); | 112 static_cast<int32_t>(exception_code)); |
105 } | 113 } |
106 | 114 |
107 } // namespace crashpad | 115 } // namespace crashpad |
OLD | NEW |