Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Issue 2363223002: Fix the Chrome OS ResourceReporter (Closed)

Created:
4 years, 3 months ago by afakhry
Modified:
4 years, 2 months ago
CC:
chromium-reviews, oshima+watch_chromium.org, davemoore+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix the Chrome OS ResourceReporter The currently reported samples are noisy and useless. We can't extract any useful info from them. This CL is an attempt to fix that by doing the following: - Report only intensive cpu (>70%) and memory (>60% of phy memory per cpu) users. - Listen to the task manager only once, get the full data and stop it once there's something to report. - Use system time instead of time ticks to accurately measure the time between reporting samples, so that it makes sense between reboots. - Update the unit tests. BUG=649486 TEST=unit_tests --gtest_filter=ResourceReporterTest.* Committed: https://crrev.com/5b2b3d9f1582f69b1dac375a73881271ed7b96c5 Cr-Commit-Position: refs/heads/master@{#424855}

Patch Set 1 : [WIP] Still need to fix unittests #

Patch Set 2 : RFR #

Patch Set 3 : Fix 2 browser_tests #

Patch Set 4 : Fix time #

Patch Set 5 : clean-up #

Patch Set 6 : Fix 2 browser_tests #

Total comments: 4

Patch Set 7 : No hardcoded memory threshold, keep watch TM until something will be reported or mem pressure level… #

Total comments: 2

Patch Set 8 : DI for the task manager to observe #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+330 lines, -373 lines) Patch
M chrome/browser/chromeos/chrome_browser_main_chromeos.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/chromeos/resource_reporter/resource_reporter.h View 1 2 3 4 5 6 7 5 chunks +25 lines, -39 lines 0 comments Download
M chrome/browser/chromeos/resource_reporter/resource_reporter.cc View 1 2 3 4 5 6 7 7 chunks +184 lines, -187 lines 1 comment Download
M chrome/browser/chromeos/resource_reporter/resource_reporter_unittest.cc View 1 2 3 4 5 6 7 6 chunks +116 lines, -146 lines 0 comments Download
M chrome/browser/prefs/browser_prefs.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 50 (35 generated)
afakhry
Nick, could you please take a look at this CL? Thanks!
4 years, 2 months ago (2016-09-29 01:26:29 UTC) #14
ncarter (slow)
Glad to see you're respinning this. lgtm https://codereview.chromium.org/2363223002/diff/100001/chrome/browser/chromeos/resource_reporter/resource_reporter.cc File chrome/browser/chromeos/resource_reporter/resource_reporter.cc (right): https://codereview.chromium.org/2363223002/diff/100001/chrome/browser/chromeos/resource_reporter/resource_reporter.cc#newcode68 chrome/browser/chromeos/resource_reporter/resource_reporter.cc:68: constexpr base::TimeDelta ...
4 years, 2 months ago (2016-09-29 21:32:12 UTC) #21
afakhry
Nick, here's what I found. - Hard coded memory usage threshold is a bad idea! ...
4 years, 2 months ago (2016-10-04 18:28:58 UTC) #25
ncarter (slow)
https://codereview.chromium.org/2363223002/diff/120001/chrome/browser/chromeos/resource_reporter/resource_reporter.h File chrome/browser/chromeos/resource_reporter/resource_reporter.h (right): https://codereview.chromium.org/2363223002/diff/120001/chrome/browser/chromeos/resource_reporter/resource_reporter.h#newcode172 chrome/browser/chromeos/resource_reporter/resource_reporter.h:172: task_manager::TaskManagerInterface* task_manager_for_testing_; A for_testing_ data member should be a ...
4 years, 2 months ago (2016-10-07 19:04:15 UTC) #28
ncarter (slow)
https://codereview.chromium.org/2363223002/diff/120001/chrome/browser/chromeos/resource_reporter/resource_reporter.h File chrome/browser/chromeos/resource_reporter/resource_reporter.h (right): https://codereview.chromium.org/2363223002/diff/120001/chrome/browser/chromeos/resource_reporter/resource_reporter.h#newcode172 chrome/browser/chromeos/resource_reporter/resource_reporter.h:172: task_manager::TaskManagerInterface* task_manager_for_testing_; A for_testing_ data member should be a ...
4 years, 2 months ago (2016-10-07 19:04:16 UTC) #29
afakhry
https://codereview.chromium.org/2363223002/diff/120001/chrome/browser/chromeos/resource_reporter/resource_reporter.h File chrome/browser/chromeos/resource_reporter/resource_reporter.h (right): https://codereview.chromium.org/2363223002/diff/120001/chrome/browser/chromeos/resource_reporter/resource_reporter.h#newcode172 chrome/browser/chromeos/resource_reporter/resource_reporter.h:172: task_manager::TaskManagerInterface* task_manager_for_testing_; On 2016/10/07 19:04:16, ncarter wrote: > A ...
4 years, 2 months ago (2016-10-12 16:37:36 UTC) #32
ncarter (slow)
lgtm
4 years, 2 months ago (2016-10-12 16:56:10 UTC) #33
afakhry
gab@chromium.org: Please review changes in >> browser_prefs.cc stevenjb@chromium.org: Please review changes in >> chrome_browser_main_chromeos.cc
4 years, 2 months ago (2016-10-12 17:11:50 UTC) #35
afakhry
stevenjb and gab are OOO. pam@chromium.org: Please review changes in >> browser_prefs.cc derat@chromium.org: Please review ...
4 years, 2 months ago (2016-10-12 17:14:34 UTC) #38
Daniel Erat
rubber-stamp lgtm for chrome_browser_main_chromeos.cc
4 years, 2 months ago (2016-10-12 19:56:37 UTC) #41
Pam (message me for reviews)
On 2016/10/12 19:56:37, Daniel Erat wrote: > rubber-stamp lgtm for chrome_browser_main_chromeos.cc rubber-stamp LGTM for chrome/browser/prefs/browser_prefs.cc
4 years, 2 months ago (2016-10-12 21:06:06 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2363223002/140001
4 years, 2 months ago (2016-10-12 21:09:36 UTC) #44
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 2 months ago (2016-10-12 21:16:13 UTC) #46
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/5b2b3d9f1582f69b1dac375a73881271ed7b96c5 Cr-Commit-Position: refs/heads/master@{#424855}
4 years, 2 months ago (2016-10-12 21:19:04 UTC) #48
gab
4 years, 2 months ago (2016-10-17 19:12:17 UTC) #50
Message was sent while issue was closed.
c/b/prefs lgtm % comment

https://codereview.chromium.org/2363223002/diff/140001/chrome/browser/chromeo...
File chrome/browser/chromeos/resource_reporter/resource_reporter.cc (right):

https://codereview.chromium.org/2363223002/diff/140001/chrome/browser/chromeo...
chrome/browser/chromeos/resource_reporter/resource_reporter.cc:64: constexpr
char kLastRapporReportTimeKey[] =
Prefs are usually defined in their owns pref_names.h files, e.g.:
https://cs.chromium.org/search/?q=file:pref_names%5C.h&sq=package:chromium&ty...

Powered by Google App Engine
This is Rietveld 408576698