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

Issue 2856243002: [Chromoting] Add ProcessStatsDispatcher to send process stats to the client

Created:
3 years, 7 months ago by Hzj_jie
Modified:
3 years, 6 months ago
Reviewers:
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Chromoting] Add ProcessStatsDispatcher to send process stats to the client This change starts a new channel (proc_stats) to dedicate sending process resource usage. A new function ConnectionToClient::stats_stub() is also added: WebRtcConnectionToClient returns ProcessStatsDispatcher, other implementations returns nullptr or FakeProcessStatsDispatcher. Refer to pending change https://codereview.chromium.org/2858813002/ for the usage. BUG=650926

Patch Set 1 #

Patch Set 2 : Change ProcessStatsDispatcher into ProcessStatsAgent and send the message through ClientStub #

Total comments: 14

Patch Set 3 : Partially resolve the review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+86 lines, -7 lines) Patch
M remoting/base/constants.h View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M remoting/base/constants.cc View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M remoting/host/security_key/security_key_extension_session.cc View 1 2 4 chunks +3 lines, -5 lines 0 comments Download
M remoting/protocol/BUILD.gn View 1 1 chunk +2 lines, -0 lines 0 comments Download
A remoting/protocol/process_stats_adapter.h View 1 2 1 chunk +34 lines, -0 lines 0 comments Download
A remoting/protocol/process_stats_adapter.cc View 1 2 1 chunk +37 lines, -0 lines 0 comments Download
M remoting/protocol/process_stats_stub.h View 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 44 (33 generated)
Hzj_jie
3 years, 7 months ago (2017-05-03 21:06:08 UTC) #7
joedow
I made a comment in the other CL, but I'm not sure process stats warrants ...
3 years, 7 months ago (2017-05-03 21:43:19 UTC) #8
Hzj_jie
On 2017/05/03 21:43:19, joedow wrote: > I made a comment in the other CL, but ...
3 years, 7 months ago (2017-05-03 22:21:09 UTC) #9
joedow
The host to client channel is used for many types of messages (for instance we ...
3 years, 7 months ago (2017-05-08 16:12:54 UTC) #10
Hzj_jie
On 2017/05/08 16:12:54, joedow wrote: > The host to client channel is used for many ...
3 years, 7 months ago (2017-05-08 20:40:32 UTC) #11
Hzj_jie
Sergey, would you mind to have a look at this change?
3 years, 7 months ago (2017-05-23 22:49:44 UTC) #29
joedow
This is much cleaner, thanks for the update! I just have a few comments/questions and ...
3 years, 6 months ago (2017-05-26 16:14:10 UTC) #30
Sergey Ulanov
The CL description doesn't seem to match the content. Can you please update the description. ...
3 years, 6 months ago (2017-05-26 19:27:30 UTC) #31
Hzj_jie
On 2017/05/26 19:27:30, Sergey Ulanov wrote: > The CL description doesn't seem to match the ...
3 years, 6 months ago (2017-05-26 19:34:56 UTC) #32
joedow
I don't think a revert to the first iteration makes sense. I have no problem ...
3 years, 6 months ago (2017-05-26 20:29:56 UTC) #40
Hzj_jie
3 years, 6 months ago (2017-05-26 20:42:16 UTC) #41
https://codereview.chromium.org/2856243002/diff/60001/remoting/base/constants.cc
File remoting/base/constants.cc (right):

https://codereview.chromium.org/2856243002/diff/60001/remoting/base/constants...
remoting/base/constants.cc:22: const char kSecurityKeyType[] = "gnubby-auth";
On 2017/05/26 16:14:10, joedow wrote:
> nit, you could remove the namespace (like the channel names above) and include
> the NS in the name: kSecurityKeyExtensionMessage
> 
> This would make the ChannelName and MessageName vars use a similar format.

Done.

https://codereview.chromium.org/2856243002/diff/60001/remoting/base/constants.h
File remoting/base/constants.h (right):

https://codereview.chromium.org/2856243002/diff/60001/remoting/base/constants...
remoting/base/constants.h:19: extern const char kProcessStatsChannelName[];
On 2017/05/26 16:14:10, joedow wrote:
> I don't see this being used in the current iteration, are you planning on
using
> it in a later CL or can it be removed.

I forgot to remove it.

https://codereview.chromium.org/2856243002/diff/60001/remoting/base/constants...
remoting/base/constants.h:29: extern const char kSecurityKeyType[];
On 2017/05/26 16:14:10, joedow wrote:
> This is a nice addition, thanks!

:)

https://codereview.chromium.org/2856243002/diff/60001/remoting/protocol/proce...
File remoting/protocol/process_stats_adapter.cc (right):

https://codereview.chromium.org/2856243002/diff/60001/remoting/protocol/proce...
remoting/protocol/process_stats_adapter.cc:29:
CHECK(usage.SerializeToString(&data));
On 2017/05/26 16:14:10, joedow wrote:
> Should this break a release build?  I think a DCHECK is fine, but if we
released
> a host where there was a problem sending stats data, I don't think I would
want
> the host to be unusable.

Reasonable. Though I think there is zero reason this function call would fail.
(The only possible failure here is a 2G+ message
https://cs.chromium.org/chromium/src/third_party/protobuf/src/google/protobuf...)

https://codereview.chromium.org/2856243002/diff/60001/remoting/protocol/proce...
File remoting/protocol/process_stats_adapter.h (right):

https://codereview.chromium.org/2856243002/diff/60001/remoting/protocol/proce...
remoting/protocol/process_stats_adapter.h:26: private:
On 2017/05/26 19:27:30, Sergey Ulanov wrote:
> nit: add empty line here

Done.

Powered by Google App Engine
This is Rietveld 408576698