CPU Time column for Task Manager |
|||||
Issue descriptionWe should consider adding CPU Time column to Task Manager. The column should display the total process CPU time since its creation. It might be useful to help identify tabs that consume more power (where more CPU cycles go over time). I've attached a snapshot that shows how does this column look in Process Explorer tool.
,
Dec 5 2016
,
Dec 6 2016
,
Dec 7 2016
To answer comment #1, this should probably be total CPU time since the process started. That data is readily available, at least on Windows. The average CPU time would be harder to implement without continuously sampling all Chrome processes.
,
Dec 7 2016
Could we just take total CPU time since the process started divided by the process uptime?
,
Dec 7 2016
We could. This should be the same as average usage of a single CPU core (%). How would we call this?
,
Dec 8 2016
The problem with getting average CPU usage is that the demominator (process uptime) may end up being non-trivial to calculate reliably. In particular, I'm not sure how easy it is to track exactly when computers go to sleep and wake up. If this can be determined easily then I agree that average CPU usage is an intrinsically easy to interpret number.
,
Dec 8 2016
Good point about the suspended state. We could get suspend / resume notification from PowerObserver and subtract time in suspended state. For example of suspend / resume notifications see PowerObserver class and GpuWatchdogThread OnSuspend/OnResume methods.
,
Dec 8 2016
Though one problem with suspended time tracking is that that would need to be handled outside the task manager (in a singleton that listens for power observer notification from the moment Chrome launches). So this might complicate the design a bit.
,
Dec 14 2016
,
Jan 10 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/848410dc4e71fa3ce9727478ab013a8948c4dfc6 commit 848410dc4e71fa3ce9727478ab013a8948c4dfc6 Author: chengx <chengx@chromium.org> Date: Tue Jan 10 02:35:03 2017 Add process start time and CPU time columns to task manager Both start time and CPU time are obtained using shared_sampler_win.cc. By default, they won't show up. BUG= 670921 Review-Url: https://codereview.chromium.org/2573183002 Cr-Commit-Position: refs/heads/master@{#442449} [modify] https://crrev.com/848410dc4e71fa3ce9727478ab013a8948c4dfc6/base/i18n/time_formatting.cc [modify] https://crrev.com/848410dc4e71fa3ce9727478ab013a8948c4dfc6/base/i18n/time_formatting.h [modify] https://crrev.com/848410dc4e71fa3ce9727478ab013a8948c4dfc6/base/i18n/time_formatting_unittest.cc [modify] https://crrev.com/848410dc4e71fa3ce9727478ab013a8948c4dfc6/chrome/app/generated_resources.grd [modify] https://crrev.com/848410dc4e71fa3ce9727478ab013a8948c4dfc6/chrome/browser/task_manager/sampling/shared_sampler.h [modify] https://crrev.com/848410dc4e71fa3ce9727478ab013a8948c4dfc6/chrome/browser/task_manager/sampling/shared_sampler_posix.cc [modify] https://crrev.com/848410dc4e71fa3ce9727478ab013a8948c4dfc6/chrome/browser/task_manager/sampling/shared_sampler_unittest_win.cc [modify] https://crrev.com/848410dc4e71fa3ce9727478ab013a8948c4dfc6/chrome/browser/task_manager/sampling/shared_sampler_win.cc [modify] https://crrev.com/848410dc4e71fa3ce9727478ab013a8948c4dfc6/chrome/browser/task_manager/sampling/task_group.cc [modify] https://crrev.com/848410dc4e71fa3ce9727478ab013a8948c4dfc6/chrome/browser/task_manager/sampling/task_group.h [modify] https://crrev.com/848410dc4e71fa3ce9727478ab013a8948c4dfc6/chrome/browser/task_manager/sampling/task_manager_impl.cc [modify] https://crrev.com/848410dc4e71fa3ce9727478ab013a8948c4dfc6/chrome/browser/task_manager/sampling/task_manager_impl.h [modify] https://crrev.com/848410dc4e71fa3ce9727478ab013a8948c4dfc6/chrome/browser/task_manager/task_manager_interface.h [modify] https://crrev.com/848410dc4e71fa3ce9727478ab013a8948c4dfc6/chrome/browser/task_manager/task_manager_observer.h [modify] https://crrev.com/848410dc4e71fa3ce9727478ab013a8948c4dfc6/chrome/browser/task_manager/test_task_manager.cc [modify] https://crrev.com/848410dc4e71fa3ce9727478ab013a8948c4dfc6/chrome/browser/task_manager/test_task_manager.h [modify] https://crrev.com/848410dc4e71fa3ce9727478ab013a8948c4dfc6/chrome/browser/ui/task_manager/task_manager_columns.cc [modify] https://crrev.com/848410dc4e71fa3ce9727478ab013a8948c4dfc6/chrome/browser/ui/task_manager/task_manager_table_model.cc
,
Jan 10 2017
,
Jan 10 2017
This is only implemented for Windows, correct? Should we leave this open to track implementation for other platforms?
,
Jan 10 2017
Re: Comment #13 Yes, it is now only implemented for Windows. Maybe create another bug for other platforms?
,
Jan 11 2017
Future implementation work for non-Windows platforms is being tracked in issue 679954. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by tdres...@chromium.org
, Dec 5 2016