blob: 74b9bf2d6be35bb7f94c38ec3d45b92db7fcb28d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/metrics/structured/histogram_util.h"
#include "base/metrics/histogram_macros.h"
namespace metrics {
namespace structured {
void LogInternalError(StructuredMetricsError error) {
UMA_HISTOGRAM_ENUMERATION("UMA.StructuredMetrics.InternalError", error);
}
void LogPrefReadError(PersistentPrefStore::PrefReadError error) {
UMA_HISTOGRAM_ENUMERATION("UMA.StructuredMetrics.PrefReadError", error,
PersistentPrefStore::PREF_READ_ERROR_MAX_ENUM);
}
void LogEventRecordingState(EventRecordingState state) {
UMA_HISTOGRAM_ENUMERATION("UMA.StructuredMetrics.EventRecordingState", state);
}
void LogNumEventsInUpload(const int num_events) {
UMA_HISTOGRAM_COUNTS_1000("UMA.StructuredMetrics.NumEventsInUpload",
num_events);
}
void LogKeyValidation(KeyValidationState state) {
UMA_HISTOGRAM_ENUMERATION("UMA.StructuredMetrics.KeyValidationState", state);
}
} // namespace structured
} // namespace metrics
|