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, ...@@ -164,6 +164,7 @@ bool ProfileMetrics::CountProfileInformation(ProfileManager* manager,
if (!HasProfileBeenActiveSince(entry, oldest)) { if (!HasProfileBeenActiveSince(entry, oldest)) {
counts->unused++; counts->unused++;
} else { } else {
counts->active++;
if (entry->IsSupervised()) if (entry->IsSupervised())
counts->supervised++; counts->supervised++;
if (entry->IsAuthenticated()) { if (entry->IsAuthenticated()) {
......
...@@ -19,6 +19,7 @@ void LogProfileMetricsCounts(const Counts& counts) { ...@@ -19,6 +19,7 @@ void LogProfileMetricsCounts(const Counts& counts) {
100 * counts.supervised / counts.total); 100 * counts.supervised / counts.total);
UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfSignedInProfiles", UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfSignedInProfiles",
counts.signedin); counts.signedin);
UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfActiveProfiles", counts.active);
UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfUnusedProfiles", counts.unused); UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfUnusedProfiles", counts.unused);
UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfSignedInProfilesWithGAIAIcons", UMA_HISTOGRAM_COUNTS_100("Profile.NumberOfSignedInProfilesWithGAIAIcons",
counts.gaia_icon); counts.gaia_icon);
......
...@@ -13,6 +13,7 @@ struct Counts { ...@@ -13,6 +13,7 @@ struct Counts {
base::HistogramBase::Sample total; base::HistogramBase::Sample total;
base::HistogramBase::Sample signedin; base::HistogramBase::Sample signedin;
base::HistogramBase::Sample supervised; base::HistogramBase::Sample supervised;
base::HistogramBase::Sample active;
base::HistogramBase::Sample unused; base::HistogramBase::Sample unused;
base::HistogramBase::Sample gaia_icon; base::HistogramBase::Sample gaia_icon;
base::HistogramBase::Sample auth_errors; base::HistogramBase::Sample auth_errors;
...@@ -21,6 +22,7 @@ struct Counts { ...@@ -21,6 +22,7 @@ struct Counts {
: total(0), : total(0),
signedin(0), signedin(0),
supervised(0), supervised(0),
active(0),
unused(0), unused(0),
gaia_icon(0), gaia_icon(0),
auth_errors(0) {} auth_errors(0) {}
......
...@@ -72651,12 +72651,25 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. ...@@ -72651,12 +72651,25 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</summary> </summary>
</histogram> </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"> <histogram name="Profile.NumberOfManagedProfiles">
<owner>pam@chromium.org</owner> <owner>pam@chromium.org</owner>
<summary> <summary>
Counts the number of locally managed profiles on a user's machine at least 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 every 24 hours while Chrome is running, among cases with at least one
profile. Always de-dupe the results with Show User Counts. profile. Always de-dupe the results with Show User Counts.
This counts only profiles that have been used in the last 28 days.
</summary> </summary>
</histogram> </histogram>
...@@ -72666,6 +72679,9 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. ...@@ -72666,6 +72679,9 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
<summary> <summary>
Counts the number of profiles on a user's machine at least every 24 hours 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. 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> </summary>
</histogram> </histogram>
...@@ -72698,6 +72714,8 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. ...@@ -72698,6 +72714,8 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
<summary> <summary>
Counts the type GAIA authentication errors on a user's machine when Chrome 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. 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> </summary>
</histogram> </histogram>
...@@ -72708,6 +72726,8 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. ...@@ -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 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 24 hours while Chrome is running. Always de-dupe the results with Show User
Counts. Counts.
This counts only profiles that have been used in the last 28 days.
</summary> </summary>
</histogram> </histogram>
...@@ -72729,6 +72749,8 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. ...@@ -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 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 avatar icon. This is counted at least every 24 hours while Chrome is
running, so always de-dupe the results with Show User Counts. 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> </summary>
</histogram> </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