New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 736434 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Bad Histogram Construction Parameters

Project Member Reported by bcwh...@chromium.org, Jun 23 2017

Issue description

Chrome Version: HEAD
Chrome OS Version: HEAD
Chrome OS Platform: ALL
Network info: N/A

See also: crbug.com/736416

A couple histograms are being constructed with bad parameters.  Though these are "corrected" at run-time, they may not be correct.  Here's the diff:

diff --git a/login_manager/login_metrics.cc b/login_manager/login_metrics.cc
index 8421aa810..ae4d988a2 100644
--- a/login_manager/login_metrics.cc
+++ b/login_manager/login_metrics.cc
@@ -66,13 +66,13 @@ LoginMetrics::~LoginMetrics() {}
 
 void LoginMetrics::SendConsumerAllowsNewUsers(bool allowed) {
   int uma_code = allowed ? ANY_USER_ALLOWED : ONLY_WHITELISTED_ALLOWED;
-  metrics_lib_.SendEnumToUMA(kLoginConsumerAllowsNewUsersMetric, uma_code, 1);
+  metrics_lib_.SendEnumToUMA(kLoginConsumerAllowsNewUsersMetric, uma_code, 2);
 }
 
 void LoginMetrics::SendLoginUserType(bool dev_mode, bool incognito,
                                      bool owner) {
   int uma_code = LoginUserTypeCode(dev_mode, incognito, owner);
-  metrics_lib_.SendEnumToUMA(kLoginUserTypeMetric, uma_code, NUM_TYPES - 1);
+  metrics_lib_.SendEnumToUMA(kLoginUserTypeMetric, uma_code, NUM_TYPES);
 }
 
 bool LoginMetrics::SendPolicyFilesStatus(const PolicyFilesStatus& status) {


I tried to create a patch for review but "repo upload" didn't know where to send it.

 
Status: Assigned (was: Unconfirmed)
Since we have a owner I am marking the bug as assigned.
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/3adc0860c3dfbc646d03d3a28b8601d82be85cda

commit 3adc0860c3dfbc646d03d3a28b8601d82be85cda
Author: Mattias Nissler <mnissler@chromium.org>
Date: Wed Sep 27 17:59:31 2017

login: Fix UMA enum max values.

The max parameter isn't actually the maximum sample value that gets
reported, but it's supposed to be a value larger than all reported
sample values.

BUG= chromium:736434 
TEST=None

Change-Id: I8b783c0441d4c22d3f9c60322d0dd5b680fe8e4a
Reviewed-on: https://chromium-review.googlesource.com/687214
Commit-Ready: Mattias Nissler <mnissler@chromium.org>
Tested-by: Mattias Nissler <mnissler@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>

[modify] https://crrev.com/3adc0860c3dfbc646d03d3a28b8601d82be85cda/login_manager/login_metrics.cc

Status: Fixed (was: Started)
No need to verify this - there aren't any user-observable changes in behavior.
 Issue 781350  has been merged into this issue.

Sign in to add a comment