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

Issue 2775983003: [Chromoting] Retrieve process resource usage (ProcessStats) and its tests (Closed)

Created:
3 years, 9 months ago by Hzj_jie
Modified:
3 years, 7 months ago
Reviewers:
Sergey Ulanov, Jamie, joedow
CC:
chromium-reviews, chromoting-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Chromoting] Retrieve process resource usage (ProcessStats) and its tests ProcessStatsStub is an interface to receive process resource usage information from a ProcessStats. ProcessResourceUsage is a structure to store the resource usage of one process. AggregatedProcessResourceUsage is a structure to store the resource usgaes of several processes. ProcessStatsAgent is an interface to retrieve resource usage of one process. CurrentProcessStatsAgent is a ProcessStatsAgent implementation to retrieve resource usage from current process. ForwardProcessStatsAgent receives resource usage from a third-party and forwards the latest usage as a ProcessStatsAgent. ProcessStatsSender is a class to regularly report resource usages from various ProcessStatsAgent implementations to a ProcessStatsStub. It merges several non-empty ProcessResourceUsage into one AggregatedProcessResourceUsage. This is typical useful on Windows: we need to calculate the resource usages from both network process and desktop process. R=sergeyu@chromium.org, jamiewalch@chromium.org BUG=650926 Review-Url: https://codereview.chromium.org/2775983003 Cr-Original-Commit-Position: refs/heads/master@{#467753} Committed: https://chromium.googlesource.com/chromium/src/+/5928f440f84065ab45f848dcd135e3c2f52ca5bb Review-Url: https://codereview.chromium.org/2775983003 Cr-Commit-Position: refs/heads/master@{#467844} Committed: https://chromium.googlesource.com/chromium/src/+/4f3f095f04100e1e443cfdcba1813bdaa625bc77

Patch Set 1 #

Total comments: 16

Patch Set 2 : Resolve review comments #

Total comments: 28

Patch Set 3 : Resolve review comments #

Total comments: 4

Patch Set 4 : Resolve review comments #

Total comments: 58

Patch Set 5 : Resolve review comments #

Total comments: 4

Patch Set 6 : Resolve review comments #

Patch Set 7 : Update the test case #

Total comments: 28

Patch Set 8 : Resolve review comments #

Total comments: 2

Patch Set 9 : Resolve review comments #

Patch Set 10 : thread_checker_ should be correctly constructed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+593 lines, -0 lines) Patch
M remoting/host/BUILD.gn View 1 2 4 chunks +10 lines, -0 lines 0 comments Download
A remoting/host/current_process_stats_agent.h View 1 2 3 4 5 6 7 1 chunk +36 lines, -0 lines 0 comments Download
A remoting/host/current_process_stats_agent.cc View 1 2 3 4 1 chunk +27 lines, -0 lines 0 comments Download
A remoting/host/forward_process_stats_agent.h View 1 2 3 4 5 1 chunk +36 lines, -0 lines 0 comments Download
A remoting/host/forward_process_stats_agent.cc View 1 2 3 4 1 chunk +25 lines, -0 lines 0 comments Download
A remoting/host/process_stats_agent.h View 1 2 3 1 chunk +26 lines, -0 lines 0 comments Download
A remoting/host/process_stats_sender.h View 1 2 3 4 5 6 7 8 1 chunk +47 lines, -0 lines 0 comments Download
A remoting/host/process_stats_sender.cc View 1 2 3 4 5 6 7 8 9 1 chunk +51 lines, -0 lines 0 comments Download
A remoting/host/process_stats_sender_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +180 lines, -0 lines 0 comments Download
A remoting/host/process_stats_util.h View 1 2 3 1 chunk +24 lines, -0 lines 0 comments Download
A remoting/host/process_stats_util.cc View 1 2 3 1 chunk +56 lines, -0 lines 0 comments Download
M remoting/proto/BUILD.gn View 1 1 chunk +1 line, -0 lines 0 comments Download
A remoting/proto/process_stats.proto View 1 1 chunk +47 lines, -0 lines 0 comments Download
M remoting/protocol/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A remoting/protocol/process_stats_stub.h View 1 2 1 chunk +26 lines, -0 lines 0 comments Download

Messages

Total messages: 97 (70 generated)
Hzj_jie
3 years, 9 months ago (2017-03-25 02:15:31 UTC) #3
Sergey Ulanov
https://codereview.chromium.org/2775983003/diff/1/remoting/base/process_resource_usage.cc File remoting/base/process_resource_usage.cc (right): https://codereview.chromium.org/2775983003/diff/1/remoting/base/process_resource_usage.cc#newcode10 remoting/base/process_resource_usage.cc:10: processor_usage += other.processor_usage; I think it would be useful ...
3 years, 9 months ago (2017-03-27 19:43:20 UTC) #6
Hzj_jie
https://codereview.chromium.org/2775983003/diff/1/remoting/base/process_resource_usage.cc File remoting/base/process_resource_usage.cc (right): https://codereview.chromium.org/2775983003/diff/1/remoting/base/process_resource_usage.cc#newcode10 remoting/base/process_resource_usage.cc:10: processor_usage += other.processor_usage; On 2017/03/27 19:43:19, Sergey Ulanov wrote: ...
3 years, 8 months ago (2017-03-30 01:09:46 UTC) #24
Sergey Ulanov
https://codereview.chromium.org/2775983003/diff/80001/remoting/base/BUILD.gn File remoting/base/BUILD.gn (right): https://codereview.chromium.org/2775983003/diff/80001/remoting/base/BUILD.gn#newcode55 remoting/base/BUILD.gn:55: if (!is_nacl) { In most other places we put ...
3 years, 8 months ago (2017-04-03 23:50:21 UTC) #27
Hzj_jie
https://codereview.chromium.org/2775983003/diff/80001/remoting/base/BUILD.gn File remoting/base/BUILD.gn (right): https://codereview.chromium.org/2775983003/diff/80001/remoting/base/BUILD.gn#newcode55 remoting/base/BUILD.gn:55: if (!is_nacl) { On 2017/04/03 23:50:21, Sergey Ulanov wrote: ...
3 years, 8 months ago (2017-04-05 20:52:17 UTC) #32
Sergey Ulanov
Couple more comments about ForwardProcessStatsAgent. Sorry I overlooked it on the previous round https://codereview.chromium.org/2775983003/diff/80001/remoting/base/process_stats.cc File ...
3 years, 8 months ago (2017-04-06 05:55:50 UTC) #33
Hzj_jie
https://codereview.chromium.org/2775983003/diff/80001/remoting/base/process_stats.cc File remoting/base/process_stats.cc (right): https://codereview.chromium.org/2775983003/diff/80001/remoting/base/process_stats.cc#newcode43 remoting/base/process_stats.cc:43: protocol::ProcessResourceUsage usage = agent->GetResourceUsage(); On 2017/04/06 05:55:50, Sergey Ulanov ...
3 years, 8 months ago (2017-04-06 19:41:05 UTC) #37
Hzj_jie
Any other comments for this change?
3 years, 8 months ago (2017-04-21 22:15:40 UTC) #40
joedow
https://codereview.chromium.org/2775983003/diff/120001/remoting/host/current_process_stats_agent.h File remoting/host/current_process_stats_agent.h (right): https://codereview.chromium.org/2775983003/diff/120001/remoting/host/current_process_stats_agent.h#newcode11 remoting/host/current_process_stats_agent.h:11: #include "base/process/process_metrics.h" forward declare 'base::ProcessMetrics' since you don't need ...
3 years, 8 months ago (2017-04-24 17:16:09 UTC) #42
Sergey Ulanov
https://codereview.chromium.org/2775983003/diff/120001/remoting/host/forward_process_stats_agent.h File remoting/host/forward_process_stats_agent.h (right): https://codereview.chromium.org/2775983003/diff/120001/remoting/host/forward_process_stats_agent.h#newcode14 remoting/host/forward_process_stats_agent.h:14: // A component to forward statistic data of another ...
3 years, 8 months ago (2017-04-24 18:49:11 UTC) #43
Hzj_jie
https://codereview.chromium.org/2775983003/diff/120001/remoting/host/current_process_stats_agent.h File remoting/host/current_process_stats_agent.h (right): https://codereview.chromium.org/2775983003/diff/120001/remoting/host/current_process_stats_agent.h#newcode11 remoting/host/current_process_stats_agent.h:11: #include "base/process/process_metrics.h" On 2017/04/24 17:16:08, joedow wrote: > forward ...
3 years, 8 months ago (2017-04-25 00:17:54 UTC) #54
joedow
https://codereview.chromium.org/2775983003/diff/120001/remoting/host/process_stats_sender.cc File remoting/host/process_stats_sender.cc (right): https://codereview.chromium.org/2775983003/diff/120001/remoting/host/process_stats_sender.cc#newcode27 remoting/host/process_stats_sender.cc:27: DCHECK(thread_checker_.CalledOnValidThread()); On 2017/04/25 00:17:53, Hzj_jie wrote: > On 2017/04/24 ...
3 years, 8 months ago (2017-04-25 15:57:28 UTC) #55
Hzj_jie
https://codereview.chromium.org/2775983003/diff/120001/remoting/host/process_stats_sender.cc File remoting/host/process_stats_sender.cc (right): https://codereview.chromium.org/2775983003/diff/120001/remoting/host/process_stats_sender.cc#newcode27 remoting/host/process_stats_sender.cc:27: DCHECK(thread_checker_.CalledOnValidThread()); On 2017/04/25 15:57:27, joedow wrote: > On 2017/04/25 ...
3 years, 8 months ago (2017-04-25 22:19:19 UTC) #57
Sergey Ulanov
lgtm https://codereview.chromium.org/2775983003/diff/120001/remoting/host/process_stats_sender.cc File remoting/host/process_stats_sender.cc (right): https://codereview.chromium.org/2775983003/diff/120001/remoting/host/process_stats_sender.cc#newcode27 remoting/host/process_stats_sender.cc:27: DCHECK(thread_checker_.CalledOnValidThread()); On 2017/04/25 22:19:19, Hzj_jie wrote: > On ...
3 years, 8 months ago (2017-04-26 05:42:43 UTC) #63
Sergey Ulanov
lgtm lgtm https://codereview.chromium.org/2775983003/diff/120001/remoting/host/process_stats_sender.cc File remoting/host/process_stats_sender.cc (right): https://codereview.chromium.org/2775983003/diff/120001/remoting/host/process_stats_sender.cc#newcode27 remoting/host/process_stats_sender.cc:27: DCHECK(thread_checker_.CalledOnValidThread()); On 2017/04/25 22:19:19, Hzj_jie wrote: > ...
3 years, 8 months ago (2017-04-26 05:42:44 UTC) #64
joedow
https://codereview.chromium.org/2775983003/diff/120001/remoting/host/process_stats_sender.cc File remoting/host/process_stats_sender.cc (right): https://codereview.chromium.org/2775983003/diff/120001/remoting/host/process_stats_sender.cc#newcode27 remoting/host/process_stats_sender.cc:27: DCHECK(thread_checker_.CalledOnValidThread()); On 2017/04/26 05:42:44, Sergey Ulanov wrote: > On ...
3 years, 8 months ago (2017-04-26 16:07:58 UTC) #65
joedow
https://codereview.chromium.org/2775983003/diff/200001/remoting/host/process_stats_sender.h File remoting/host/process_stats_sender.h (right): https://codereview.chromium.org/2775983003/diff/200001/remoting/host/process_stats_sender.h#newcode33 remoting/host/process_stats_sender.h:33: // ProcessStatsSender stops in destruction. I don't think this ...
3 years, 8 months ago (2017-04-26 16:44:06 UTC) #66
Hzj_jie
https://codereview.chromium.org/2775983003/diff/120001/remoting/host/process_stats_sender.cc File remoting/host/process_stats_sender.cc (right): https://codereview.chromium.org/2775983003/diff/120001/remoting/host/process_stats_sender.cc#newcode27 remoting/host/process_stats_sender.cc:27: DCHECK(thread_checker_.CalledOnValidThread()); On 2017/04/26 16:07:57, joedow wrote: > On 2017/04/26 ...
3 years, 8 months ago (2017-04-26 20:47:20 UTC) #69
joedow
https://codereview.chromium.org/2775983003/diff/200001/remoting/host/process_stats_sender.cc File remoting/host/process_stats_sender.cc (right): https://codereview.chromium.org/2775983003/diff/200001/remoting/host/process_stats_sender.cc#newcode40 remoting/host/process_stats_sender.cc:40: if (agents_.empty()) { On 2017/04/26 20:47:19, Hzj_jie wrote: > ...
3 years, 8 months ago (2017-04-26 23:48:02 UTC) #72
Hzj_jie
https://codereview.chromium.org/2775983003/diff/200001/remoting/host/process_stats_sender.cc File remoting/host/process_stats_sender.cc (right): https://codereview.chromium.org/2775983003/diff/200001/remoting/host/process_stats_sender.cc#newcode40 remoting/host/process_stats_sender.cc:40: if (agents_.empty()) { On 2017/04/26 23:48:01, joedow wrote: > ...
3 years, 8 months ago (2017-04-27 02:21:34 UTC) #75
joedow
lgtm https://codereview.chromium.org/2775983003/diff/200001/remoting/host/process_stats_sender.cc File remoting/host/process_stats_sender.cc (right): https://codereview.chromium.org/2775983003/diff/200001/remoting/host/process_stats_sender.cc#newcode40 remoting/host/process_stats_sender.cc:40: if (agents_.empty()) { On 2017/04/27 02:21:33, Hzj_jie wrote: ...
3 years, 7 months ago (2017-04-27 15:01:56 UTC) #78
Hzj_jie
https://codereview.chromium.org/2775983003/diff/200001/remoting/host/process_stats_sender.cc File remoting/host/process_stats_sender.cc (right): https://codereview.chromium.org/2775983003/diff/200001/remoting/host/process_stats_sender.cc#newcode40 remoting/host/process_stats_sender.cc:40: if (agents_.empty()) { On 2017/04/27 15:01:55, joedow wrote: > ...
3 years, 7 months ago (2017-04-27 18:28:49 UTC) #79
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/2775983003/240001
3 years, 7 months ago (2017-04-27 18:30:22 UTC) #82
commit-bot: I haz the power
Committed patchset #9 (id:240001) as https://chromium.googlesource.com/chromium/src/+/5928f440f84065ab45f848dcd135e3c2f52ca5bb
3 years, 7 months ago (2017-04-27 19:36:03 UTC) #85
Qiang(Joe) Xu
A revert of this CL (patchset #9 id:240001) has been created in https://codereview.chromium.org/2847743004/ by warx@chromium.org. ...
3 years, 7 months ago (2017-04-27 20:50:03 UTC) #86
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/2775983003/260001
3 years, 7 months ago (2017-04-28 02:06:53 UTC) #94
commit-bot: I haz the power
3 years, 7 months ago (2017-04-28 02:16:28 UTC) #97
Message was sent while issue was closed.
Committed patchset #10 (id:260001) as
https://chromium.googlesource.com/chromium/src/+/4f3f095f04100e1e443cfdcba181...

Powered by Google App Engine
This is Rietveld 408576698