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

Issue 1238343002: Added ConnectionTimeObserver to calculate the times to authenticate and connect. (Closed)

Created:
5 years, 5 months ago by tonychun
Modified:
5 years, 4 months ago
CC:
chromium-reviews, chromoting-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Added ConnectionTimeObserver to provide a way to calculate times between the different stages. The ConnectionTimeObserver saves the state of the client and the time when the client state changes. The delta times can be accessed through GetStateTransitionDelay and a start and end state. BUG= Committed: https://crrev.com/684d1414ae40738e455092831088fbc0391ab11d Cr-Commit-Position: refs/heads/master@{#341232}

Patch Set 1 #

Total comments: 14

Patch Set 2 : Changed to ConnectionTimeObserver. #

Total comments: 7

Patch Set 3 : Synced with recent changes to connect to local host and cleaned up Connection Time Observer. #

Total comments: 32

Patch Set 4 : Added unittest, display connection stats ability, and error check for transition delay. #

Total comments: 26

Patch Set 5 : Modified display stats and added quit after connected. #

Total comments: 18

Patch Set 6 : Removed timer from observer, used print friendly string in TestChromotingClient, and made modificat… #

Total comments: 24

Patch Set 7 : Moved ConnectionStateToFriendlyString to ConnectionToHostImpl and Added environment class to main. #

Total comments: 11

Patch Set 8 : Moved FriendlyString to errors.h and connection_to_host.h. Cleaned up connection_time_observer_unit… #

Total comments: 10

Patch Set 9 : Made ToString methods into functions. Made code more readable and removed multiple defines in chromoting_instance.cc #

Total comments: 3

Patch Set 10 : Moved implementation to connection_to_host_impl.cc and removed inline. #

Total comments: 8

Patch Set 11 : Added errors.cc and cleaned up switch statements. #

Total comments: 6

Patch Set 12 : Removed unused headers. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+418 lines, -91 lines) Patch
M remoting/client/plugin/chromoting_instance.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +1 line, -22 lines 0 comments Download
M remoting/protocol/connection_to_host.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M remoting/protocol/connection_to_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +17 lines, -0 lines 0 comments Download
M remoting/protocol/errors.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
A remoting/protocol/errors.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +34 lines, -0 lines 0 comments Download
M remoting/remoting_srcs.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M remoting/remoting_test.gypi View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
M remoting/test/BUILD.gn View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
M remoting/test/chromoting_test_driver.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
A remoting/test/connection_time_observer.h View 1 2 3 4 5 6 7 8 1 chunk +61 lines, -0 lines 0 comments Download
A remoting/test/connection_time_observer.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +113 lines, -0 lines 0 comments Download
A remoting/test/connection_time_observer_unittest.cc View 1 2 3 4 5 6 7 1 chunk +176 lines, -0 lines 0 comments Download
M remoting/test/test_chromoting_client.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -68 lines 0 comments Download

Messages

Total messages: 41 (11 generated)
tonychun
Created a ChromotingConnectionObserver to display times to authenticate and connect.
5 years, 5 months ago (2015-07-20 15:47:55 UTC) #3
joedow
https://codereview.chromium.org/1238343002/diff/20001/remoting/test/chromoting_connection_observer.cc File remoting/test/chromoting_connection_observer.cc (right): https://codereview.chromium.org/1238343002/diff/20001/remoting/test/chromoting_connection_observer.cc#newcode20 remoting/test/chromoting_connection_observer.cc:20: {protocol::ConnectionToHost::State::CLOSED, "CLOSED"}}; I think this would be cleaner as ...
5 years, 5 months ago (2015-07-20 16:30:58 UTC) #4
tonychun
Changed the name of the class to ConnectionTimeObserver and replaced the map with a switch ...
5 years, 5 months ago (2015-07-20 17:49:59 UTC) #5
Sergey Ulanov
https://codereview.chromium.org/1238343002/diff/40001/remoting/test/connection_time_observer.cc File remoting/test/connection_time_observer.cc (right): https://codereview.chromium.org/1238343002/diff/40001/remoting/test/connection_time_observer.cc#newcode38 remoting/test/connection_time_observer.cc:38: : current_state_(protocol::ConnectionToHost::State::INITIALIZING), nit: move this initializer to .h https://codereview.chromium.org/1238343002/diff/40001/remoting/test/connection_time_observer.h ...
5 years, 5 months ago (2015-07-20 23:04:05 UTC) #6
tonychun
Synced with recent changes to connect to local host and added a GetStateTransitionDelay method to ...
5 years, 5 months ago (2015-07-23 03:31:04 UTC) #7
tonychun
5 years, 5 months ago (2015-07-23 14:59:06 UTC) #8
joedow
https://codereview.chromium.org/1238343002/diff/80001/remoting/remoting_test.gypi File remoting/remoting_test.gypi (right): https://codereview.chromium.org/1238343002/diff/80001/remoting/remoting_test.gypi#newcode62 remoting/remoting_test.gypi:62: 'test/connection_time_observer.h', Unittests? https://codereview.chromium.org/1238343002/diff/80001/remoting/test/connection_time_observer.cc File remoting/test/connection_time_observer.cc (right): https://codereview.chromium.org/1238343002/diff/80001/remoting/test/connection_time_observer.cc#newcode29 remoting/test/connection_time_observer.cc:29: LOG(ERROR) ...
5 years, 5 months ago (2015-07-23 16:57:55 UTC) #10
Sergey Ulanov
https://codereview.chromium.org/1238343002/diff/80001/remoting/test/connection_time_observer.cc File remoting/test/connection_time_observer.cc (right): https://codereview.chromium.org/1238343002/diff/80001/remoting/test/connection_time_observer.cc#newcode11 remoting/test/connection_time_observer.cc:11: namespace { Move this inside remoting::test namespace then you ...
5 years, 5 months ago (2015-07-23 19:20:57 UTC) #11
tonychun
Updated the ConnectionTimeObserver to be able to display the connection stats (shows total time and ...
5 years, 5 months ago (2015-07-24 01:41:47 UTC) #12
joedow
https://codereview.chromium.org/1238343002/diff/100001/remoting/test/connection_time_observer.cc File remoting/test/connection_time_observer.cc (right): https://codereview.chromium.org/1238343002/diff/100001/remoting/test/connection_time_observer.cc#newcode15 remoting/test/connection_time_observer.cc:15: std::string GetStateAsString(const protocol::ConnectionToHost::State& state) { no need for const ...
5 years, 5 months ago (2015-07-24 13:38:29 UTC) #14
tonychun
Updated display stats and added ability to run done closure as soon as chromoting connection ...
5 years, 4 months ago (2015-07-27 16:03:38 UTC) #15
joedow
https://codereview.chromium.org/1238343002/diff/140001/remoting/test/connection_time_observer.cc File remoting/test/connection_time_observer.cc (right): https://codereview.chromium.org/1238343002/diff/140001/remoting/test/connection_time_observer.cc#newcode77 remoting/test/connection_time_observer.cc:77: timer_->user_task().Run(); If you are trying to get to the ...
5 years, 4 months ago (2015-07-27 16:25:39 UTC) #16
anandc
https://codereview.chromium.org/1238343002/diff/140001/remoting/test/chromoting_test_driver.cc File remoting/test/chromoting_test_driver.cc (right): https://codereview.chromium.org/1238343002/diff/140001/remoting/test/chromoting_test_driver.cc#newcode201 remoting/test/chromoting_test_driver.cc:201: // Update the logging verbosity level is user specified ...
5 years, 4 months ago (2015-07-27 18:22:29 UTC) #17
tonychun
Removed timer from observer, used print friendly string in TestChromotingClient, and made modifications to code ...
5 years, 4 months ago (2015-07-27 21:20:42 UTC) #18
joedow
https://codereview.chromium.org/1238343002/diff/160001/remoting/test/chromoting_test_driver.cc File remoting/test/chromoting_test_driver.cc (right): https://codereview.chromium.org/1238343002/diff/160001/remoting/test/chromoting_test_driver.cc#newcode310 remoting/test/chromoting_test_driver.cc:310: test_chromoting_client.AddRemoteConnectionObserver(&observer); Please send an update once your change to ...
5 years, 4 months ago (2015-07-27 21:45:45 UTC) #19
tonychun
Merged with environment to main changes and made changes to use FriendlyString. https://codereview.chromium.org/1238343002/diff/160001/remoting/test/chromoting_test_driver.cc File remoting/test/chromoting_test_driver.cc ...
5 years, 4 months ago (2015-07-28 17:53:45 UTC) #22
joedow
https://codereview.chromium.org/1238343002/diff/200001/remoting/protocol/connection_to_host_impl.h File remoting/protocol/connection_to_host_impl.h (right): https://codereview.chromium.org/1238343002/diff/200001/remoting/protocol/connection_to_host_impl.h#newcode44 remoting/protocol/connection_to_host_impl.h:44: remoting::protocol::ErrorCode error_code); I'm wondering if this should be in ...
5 years, 4 months ago (2015-07-28 23:09:06 UTC) #23
Sergey Ulanov
https://codereview.chromium.org/1238343002/diff/200001/remoting/protocol/connection_to_host_impl.cc File remoting/protocol/connection_to_host_impl.cc (right): https://codereview.chromium.org/1238343002/diff/200001/remoting/protocol/connection_to_host_impl.cc#newcode31 remoting/protocol/connection_to_host_impl.cc:31: case remoting::protocol::ConnectionToHost::INITIALIZING: You can use macro like this to ...
5 years, 4 months ago (2015-07-29 00:56:23 UTC) #24
tonychun
Moved around ToFriendString methods to errors.h and ConnectionToHost. https://codereview.chromium.org/1238343002/diff/200001/remoting/protocol/connection_to_host_impl.cc File remoting/protocol/connection_to_host_impl.cc (right): https://codereview.chromium.org/1238343002/diff/200001/remoting/protocol/connection_to_host_impl.cc#newcode31 remoting/protocol/connection_to_host_impl.cc:31: case ...
5 years, 4 months ago (2015-07-29 16:10:14 UTC) #25
joedow
https://codereview.chromium.org/1238343002/diff/220001/remoting/protocol/connection_to_host.h File remoting/protocol/connection_to_host.h (right): https://codereview.chromium.org/1238343002/diff/220001/remoting/protocol/connection_to_host.h#newcode18 remoting/protocol/connection_to_host.h:18: return #x; I'm personally not a fan of macros ...
5 years, 4 months ago (2015-07-29 17:07:02 UTC) #26
tonychun
I've moved the methods out into inlined functions. I've also cleaned up the code in ...
5 years, 4 months ago (2015-07-29 18:30:33 UTC) #29
joedow
lgtm. Once inline is removed. https://codereview.chromium.org/1238343002/diff/280001/remoting/protocol/connection_to_host.h File remoting/protocol/connection_to_host.h (right): https://codereview.chromium.org/1238343002/diff/280001/remoting/protocol/connection_to_host.h#newcode114 remoting/protocol/connection_to_host.h:114: inline const char* ConnectionStateToString(ConnectionToHost::State ...
5 years, 4 months ago (2015-07-29 20:09:31 UTC) #31
tonychun
Removed inline and moved implementation to connection_to_host_impl.cc.
5 years, 4 months ago (2015-07-29 21:11:38 UTC) #32
Sergey Ulanov
https://codereview.chromium.org/1238343002/diff/320001/remoting/protocol/connection_to_host.h File remoting/protocol/connection_to_host.h (right): https://codereview.chromium.org/1238343002/diff/320001/remoting/protocol/connection_to_host.h#newcode111 remoting/protocol/connection_to_host.h:111: const char* ConnectionStateToString(ConnectionToHost::State state); I think I suggested this ...
5 years, 4 months ago (2015-07-30 21:00:42 UTC) #33
tonychun
Created errors.cc and moved around switch statements. https://codereview.chromium.org/1238343002/diff/320001/remoting/protocol/connection_to_host.h File remoting/protocol/connection_to_host.h (right): https://codereview.chromium.org/1238343002/diff/320001/remoting/protocol/connection_to_host.h#newcode111 remoting/protocol/connection_to_host.h:111: const char* ...
5 years, 4 months ago (2015-07-30 21:43:16 UTC) #34
Sergey Ulanov
lgtm when my nits are addressed. https://codereview.chromium.org/1238343002/diff/340001/remoting/protocol/connection_to_host.h File remoting/protocol/connection_to_host.h (right): https://codereview.chromium.org/1238343002/diff/340001/remoting/protocol/connection_to_host.h#newcode11 remoting/protocol/connection_to_host.h:11: #include "base/logging.h" nit: ...
5 years, 4 months ago (2015-07-30 22:00:44 UTC) #35
tonychun
Removed unused headers. https://codereview.chromium.org/1238343002/diff/340001/remoting/protocol/connection_to_host.h File remoting/protocol/connection_to_host.h (right): https://codereview.chromium.org/1238343002/diff/340001/remoting/protocol/connection_to_host.h#newcode11 remoting/protocol/connection_to_host.h:11: #include "base/logging.h" On 2015/07/30 22:00:44, Sergey ...
5 years, 4 months ago (2015-07-30 23:20:27 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1238343002/360001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1238343002/360001
5 years, 4 months ago (2015-07-30 23:21:16 UTC) #39
commit-bot: I haz the power
Committed patchset #12 (id:360001)
5 years, 4 months ago (2015-07-31 00:05:55 UTC) #40
commit-bot: I haz the power
5 years, 4 months ago (2015-07-31 00:06:32 UTC) #41
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/684d1414ae40738e455092831088fbc0391ab11d
Cr-Commit-Position: refs/heads/master@{#341232}

Powered by Google App Engine
This is Rietveld 408576698