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

Issue 678865 link

Starred by 2 users

Issue metadata

Status: Archived
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

metrics: Collect basic crouton usage stats

Project Member Reported by drinkcat@chromium.org, Jan 6 2017

Issue description

We'd like to collect basic UMA metrics for crouton, by checking for the presence of `/var/run/crouton`, which tells us if crouton has been run since the previous boot.
 
Cc: asvitk...@chromium.org
For accurate counting, we should probably send metrics "Platform.Crouton.Started"=Off once, on boot, and then send "Platform.Crouton.Started"=On only once, after the file has been created. The histogram value "On" will tell us the number of active users, and "Off"-"On" the number of non-active users.

Arguably, we could also send only metrics when the file is detected, and cross the value with Platform.BootTime.DevSwitch, but the above seems more reliable?
> we should probably send metrics "Platform.Crouton.Started"=Off once, on boot

How is that not the same as Platform.BootTime.DevSwitch?  Unless we only send Off if we know we previously sent On; do we even have that kind of state to play with?
> How is that not the same as Platform.BootTime.DevSwitch?

Should be mostly the same yes... I'm hoping people with more experiences with metrics can help with that (I can't find any metrics that only send data when something happens, rather than always sending a boolean). semenzato/asvitkine: Any opinion?

> Unless we only send Off if we know we previously sent On; do we even have that kind of state to play with?

I don't think we care about this. It's very unlikely that /run/crouton would be deleted anyway...
Does "Platform.Crouton.Started"=Off happen on verified-mode machines?  How do we determine % Chromium OS users using crouton vs. % dev mode users using crouton?
> Does "Platform.Crouton.Started"=Off happen on verified-mode machines?

Yes. It's also there to check that the metric actually works and is reported.

> How do we determine % Chromium OS users using crouton vs. % dev mode users using crouton?

We can cross that with Platform.BootTime.DevSwitch (and check that the totals match).

(also, I think you mean Chrome OS users, I don't think Chromium OS reports metrics, at least, it shouldn't).
Project Member

Comment 7 by bugdroid1@chromium.org, Jan 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f19152f5dc5662089835b10bf7d98c7bcbc42efd

commit f19152f5dc5662089835b10bf7d98c7bcbc42efd
Author: drinkcat <drinkcat@chromium.org>
Date: Wed Jan 18 04:54:56 2017

Add histogram definitions for Chrome OS crouton statistics

This adds enum type definitions and histogram declaration for
crouton metric recorded by the Chrome OS metrics daemon. See also
https://chromium-review.googlesource.com/#/c/425529 .

BUG= chromium:678865 
TEST=None

Review-Url: https://codereview.chromium.org/2616663005
Cr-Commit-Position: refs/heads/master@{#444277}

[modify] https://crrev.com/f19152f5dc5662089835b10bf7d98c7bcbc42efd/tools/metrics/histograms/histograms.xml

Project Member

Comment 8 by bugdroid1@chromium.org, Jan 19 2017

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

commit b757179c3e01b37f7b7508e570a8c3e80ef998b8
Author: Nicolas Boichat <drinkcat@google.com>
Date: Fri Jan 06 02:33:50 2017

metrics: Report basic crouton usage

Detects if /run/crouton exists, and sends "Platform.Crouton.Started"=1
when that happens.

Note that we also send "Platform.Crouton.Started"=0 on boot, for
accurate counting, so that the number of elements in "1" bucket
tells us about active users, and "0" tells us the total number
of users.

BUG= chromium:678865 
TEST=emerge-elm metrics; cros deploy IP metrics; reboot
     check chrome://histograms after boot

Change-Id: I06493a5a9501630ff41ad2a261d6e1c93f73cfd1
Reviewed-on: https://chromium-review.googlesource.com/425529
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Ilya Sherman <isherman@chromium.org>

[modify] https://crrev.com/b757179c3e01b37f7b7508e570a8c3e80ef998b8/metrics/metrics_daemon.cc
[modify] https://crrev.com/b757179c3e01b37f7b7508e570a8c3e80ef998b8/metrics/metrics_daemon.h

Status: Fixed (was: Assigned)

Comment 10 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59

Comment 11 by dchan@google.com, May 30 2017

Labels: VerifyIn-60
Labels: VerifyIn-61

Comment 13 by dchan@chromium.org, Oct 14 2017

Status: Archived (was: Fixed)

Sign in to add a comment