blob: 446c261dd542650c976afaaf0dbbe5b9c8dc7288 [file] [log] [blame]
droger78da6542015-11-02 11:25:591// Copyright 2015 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "components/profile_metrics/counts.h"
6
asvitkinef5d4ee562016-11-07 18:57:087#include "base/metrics/histogram_macros.h"
droger78da6542015-11-02 11:25:598
9namespace profile_metrics {
10
11void LogProfileMetricsCounts(const Counts& counts) {
12 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfProfiles", counts.total);
13
14 // Ignore other metrics if we have no profiles.
15 if (counts.total > 0) {
16 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfManagedProfiles",
17 counts.supervised);
18 UMA_HISTOGRAM_COUNTS_100("Profile.PercentageOfManagedProfiles",
19 100 * counts.supervised / counts.total);
20 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfSignedInProfiles",
21 counts.signedin);
Florian Uunkdefcedc2018-04-26 11:56:0622 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfActiveProfiles", counts.active);
droger78da6542015-11-02 11:25:5923 UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfUnusedProfiles", counts.unused);
Jan Krcalb3afc672020-11-17 11:36:3724 UMA_HISTOGRAM_ENUMERATION("Profile.ColorsUniqueness",
25 counts.colors_uniqueness);
droger78da6542015-11-02 11:25:5926 }
27}
28
29} // namespace profile_metrics