Report stats about inactivity-triggered power management events |
||
Issue descriptionIt's difficult to reason about the impact of proposed changes to our power management logic (e.g. issue 782725 , http://doc/1CBIQPj-7WBox06z9Wx39fDGOmlWxD4E88HEvjnY8DMg/edit). I think we should report histogram metrics about various inactivity-triggered actions that powerd performs, maybe along the lines of the following to start out with: Power.IdleScreenDimDaily Power.IdleScreenOffDaily Power.IdleSuspendDaily (I don't think it's possible to track inactivity-triggered screen-locking in Chrome right now, but I'm also not sure that it's an interesting thing to measure.) Chrome has code to help perform actions (roughly) daily at components/metrics/daily_event.h; see chrome/browser/metrics/tab_stats_tracker.cc for an example use of it to report metrics. Is it also useful to report: a) total daily time spent in screen-dimmed and screen-off states, and b) total daily time spent in screen-dimmed and screen-off states only when it results in the system suspending ?
,
Nov 9 2017
jia, did you intend to delete your response here?
,
Nov 9 2017
Yes, I did, now I'm using the correct account under chromium.org. :) I guess I don't need to re-post my comment now, as we've discussed the issue in the attached doc. Thanks for generating additional metrics, super helpful indeed. :)
,
Nov 10 2017
Sent https://crrev.com/c/762259 to add the first three histograms mentioned in the original description. I've renamed them: Power.IdleScreenDimCountDaily Power.IdleScreenOffCountDaily Power.IdleSuspendCountDaily
,
Nov 14 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/eb06a79f5b790460b50c49b69ec0966aa7f354a1 commit eb06a79f5b790460b50c49b69ec0966aa7f354a1 Author: Daniel Erat <derat@chromium.org> Date: Tue Nov 14 22:30:51 2017 metrics: Make DailyEvent pass reason to observers. Make metrics::DailyEvent pass observers the reason that it's notifying them. This allows observers to e.g. ignore first-run notifications if they only want to report metrics when a full day has passed. Bug: 782953 Change-Id: I19b7bd627f56563d59dd102bb234c0e759eecb4a Reviewed-on: https://chromium-review.googlesource.com/766549 Reviewed-by: Steven Holte <holte@chromium.org> Reviewed-by: Michael Giuffrida <michaelpg@chromium.org> Commit-Queue: Dan Erat <derat@chromium.org> Cr-Commit-Position: refs/heads/master@{#516467} [modify] https://crrev.com/eb06a79f5b790460b50c49b69ec0966aa7f354a1/chrome/browser/metrics/tab_stats_tracker.cc [modify] https://crrev.com/eb06a79f5b790460b50c49b69ec0966aa7f354a1/chrome/browser/metrics/tab_stats_tracker.h [modify] https://crrev.com/eb06a79f5b790460b50c49b69ec0966aa7f354a1/components/metrics/daily_event.cc [modify] https://crrev.com/eb06a79f5b790460b50c49b69ec0966aa7f354a1/components/metrics/daily_event.h [modify] https://crrev.com/eb06a79f5b790460b50c49b69ec0966aa7f354a1/components/metrics/daily_event_unittest.cc
,
Nov 16 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/645c865295fdd5bb0762a1ad4f7238ccc03fcce3 commit 645c865295fdd5bb0762a1ad4f7238ccc03fcce3 Author: Daniel Erat <derat@chromium.org> Date: Thu Nov 16 00:01:57 2017 chromeos: Report daily power management metrics. Add a PowerMetricsReporter class that reports new power-management-related histograms: Power.IdleScreenDimCountDaily Power.IdleScreenOffCountDaily Power.IdleSuspendCountDaily These events' counts are reported once per day. Bug: 782953 Change-Id: Icafc451c5e05d98d9597deb8a6a12da5c86d3354 Reviewed-on: https://chromium-review.googlesource.com/762259 Reviewed-by: Michael Giuffrida <michaelpg@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: Ilya Sherman <isherman@chromium.org> Commit-Queue: Dan Erat <derat@chromium.org> Cr-Commit-Position: refs/heads/master@{#516903} [modify] https://crrev.com/645c865295fdd5bb0762a1ad4f7238ccc03fcce3/chrome/browser/chromeos/BUILD.gn [modify] https://crrev.com/645c865295fdd5bb0762a1ad4f7238ccc03fcce3/chrome/browser/chromeos/chrome_browser_main_chromeos.cc [modify] https://crrev.com/645c865295fdd5bb0762a1ad4f7238ccc03fcce3/chrome/browser/chromeos/chrome_browser_main_chromeos.h [add] https://crrev.com/645c865295fdd5bb0762a1ad4f7238ccc03fcce3/chrome/browser/chromeos/power/power_metrics_reporter.cc [add] https://crrev.com/645c865295fdd5bb0762a1ad4f7238ccc03fcce3/chrome/browser/chromeos/power/power_metrics_reporter.h [add] https://crrev.com/645c865295fdd5bb0762a1ad4f7238ccc03fcce3/chrome/browser/chromeos/power/power_metrics_reporter_unittest.cc [modify] https://crrev.com/645c865295fdd5bb0762a1ad4f7238ccc03fcce3/chrome/browser/prefs/browser_prefs.cc [modify] https://crrev.com/645c865295fdd5bb0762a1ad4f7238ccc03fcce3/chrome/common/pref_names.cc [modify] https://crrev.com/645c865295fdd5bb0762a1ad4f7238ccc03fcce3/chrome/common/pref_names.h [modify] https://crrev.com/645c865295fdd5bb0762a1ad4f7238ccc03fcce3/chromeos/dbus/fake_power_manager_client.cc [modify] https://crrev.com/645c865295fdd5bb0762a1ad4f7238ccc03fcce3/chromeos/dbus/fake_power_manager_client.h [modify] https://crrev.com/645c865295fdd5bb0762a1ad4f7238ccc03fcce3/tools/metrics/histograms/histograms.xml
,
Nov 21 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e89df0bd597a6276ac396b730c402410558b56ac commit e89df0bd597a6276ac396b730c402410558b56ac Author: Daniel Erat <derat@chromium.org> Date: Tue Nov 21 23:35:35 2017 chromeos: Add Power.LidClosedSuspendCountDaily histogram. Add a new histogram metric tracking the number of daily suspends triggered by Chromebooks' lids being closed. Bug: 782953 Change-Id: I86540cec8b677823b00d79d8699dc005c238ab1d Reviewed-on: https://chromium-review.googlesource.com/780427 Commit-Queue: Dan Erat <derat@chromium.org> Reviewed-by: Michael Giuffrida <michaelpg@chromium.org> Reviewed-by: Ilya Sherman <isherman@chromium.org> Cr-Commit-Position: refs/heads/master@{#518447} [modify] https://crrev.com/e89df0bd597a6276ac396b730c402410558b56ac/chrome/browser/chromeos/power/power_metrics_reporter.cc [modify] https://crrev.com/e89df0bd597a6276ac396b730c402410558b56ac/chrome/browser/chromeos/power/power_metrics_reporter.h [modify] https://crrev.com/e89df0bd597a6276ac396b730c402410558b56ac/chrome/browser/chromeos/power/power_metrics_reporter_unittest.cc [modify] https://crrev.com/e89df0bd597a6276ac396b730c402410558b56ac/chrome/common/pref_names.cc [modify] https://crrev.com/e89df0bd597a6276ac396b730c402410558b56ac/chrome/common/pref_names.h [modify] https://crrev.com/e89df0bd597a6276ac396b730c402410558b56ac/tools/metrics/histograms/histograms.xml
,
Jan 26 2018
I'm going to pass on adding Chrome time-spent-in-state metrics unless someone has a use for them. |
||
►
Sign in to add a comment |
||
Comment 1 Deleted