Commit defcedc9 authored by Florian Uunk's avatar Florian Uunk Committed by Commit Bot

Create Profile.NumberOfActiveProfiles metric

Currently most Profile.NumberOf[...] metrics only count 28DA profiles.
However, the Profile.NumberOfProfiles metric counts all profiles,
including inactive ones.

Add a Profile.NumberOfActiveProfiles metric to use as denominator for
NumberOf[...] metrics that count active profiles. Also update the
documentation on the NumberOf[...] metrics to describe whether they
count all or only active profiles.

BUG=832005

Change-Id: I85a23dfd792e8a39a88459b989e911126a9fca48
Reviewed-on: https://chromium-review.googlesource.com/1021813Reviewed-by: default avatarMihai Sardarescu <msarda@chromium.org>
Reviewed-by: default avataranthonyvd <anthonyvd@chromium.org>
Reviewed-by: default avatarMark Pearson <mpearson@chromium.org>
Commit-Queue: Florian Uunk <feuunk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553986}
parent 58759a53
......@@ -164,6 +164,7 @@ bool ProfileMetrics::CountProfileInformation(ProfileManager* manager,
if (!HasProfileBeenActiveSince(entry, oldest)) {
counts->unused++;
} else {
counts->active++;
if (entry->IsSupervised())
counts->supervised++;
if (entry->IsAuthenticated()) {
......
......@@ -19,6 +19,7 @@ void LogProfileMetricsCounts(const Counts& counts) {
100 * counts.supervised / counts.total);
UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfSignedInProfiles",
counts.signedin);
UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfActiveProfiles", counts.active);
UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfUnusedProfiles", counts.unused);
UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfSignedInProfilesWithGAIAIcons",
counts.gaia_icon);
......
......@@ -13,6 +13,7 @@ struct Counts {
base::HistogramBase::Sample total;
base::HistogramBase::Sample signedin;
base::HistogramBase::Sample supervised;
base::HistogramBase::Sample active;
base::HistogramBase::Sample unused;
base::HistogramBase::Sample gaia_icon;
base::HistogramBase::Sample auth_errors;
......@@ -21,6 +22,7 @@ struct Counts {
: total(0),
signedin(0),
supervised(0),
active(0),
unused(0),
gaia_icon(0),
auth_errors(0) {}
......
......@@ -72651,12 +72651,25 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</summary>
</histogram>
<histogram name="Profile.NumberOfActiveProfiles">
<owner>feuunk@chromium.org</owner>
<summary>
Counts the number of profiles on a user's machine at least every 24 hours
while Chrome is running. Always de-dupe the results with Show User Counts.
As opposed to Profile.NumberOfProfiles, this counts only profiles that have
been used in the last 28 days.
</summary>
</histogram>
<histogram name="Profile.NumberOfManagedProfiles">
<owner>pam@chromium.org</owner>
<summary>
Counts the number of locally managed profiles on a user's machine at least
every 24 hours while Chrome is running, among cases with at least one
profile. Always de-dupe the results with Show User Counts.
This counts only profiles that have been used in the last 28 days.
</summary>
</histogram>
......@@ -72666,6 +72679,9 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
<summary>
Counts the number of profiles on a user's machine at least every 24 hours
while Chrome is running. Always de-dupe the results with Show User Counts.
This counts the total number of profiles on the user's device, regardless of
whether they've been used recently.
</summary>
</histogram>
......@@ -72698,6 +72714,8 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
<summary>
Counts the type GAIA authentication errors on a user's machine when Chrome
starts up. The types of errors are broken down in Signin.AuthError.
This counts only profiles that have been used in the last 28 days.
</summary>
</histogram>
......@@ -72708,6 +72726,8 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
Counts the number of signed-in profiles on a user's machine at least every
24 hours while Chrome is running. Always de-dupe the results with Show User
Counts.
This counts only profiles that have been used in the last 28 days.
</summary>
</histogram>
......@@ -72729,6 +72749,8 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
Counts the number of signed-in profiles that are using the GAIA image as the
avatar icon. This is counted at least every 24 hours while Chrome is
running, so always de-dupe the results with Show User Counts.
This counts only profiles that have been used in the last 28 days.
</summary>
</histogram>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment