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

Issue 9732008: [Sync] Store the past 10 traffic records in memory. (Closed)

Created:
8 years, 9 months ago by lipalani1
Modified:
8 years, 8 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

We store the past 10 records of client server communication in a queue in memory. The next patch would address the javascript side of exposing it in the UI. BUG= TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=130001

Patch Set 1 #

Patch Set 2 : Self review. #

Patch Set 3 : #

Patch Set 4 : Self review. #

Patch Set 5 : #

Patch Set 6 : For review. #

Total comments: 17

Patch Set 7 : For review. #

Total comments: 2

Patch Set 8 : For review. #

Patch Set 9 : For review. #

Patch Set 10 : For review. #

Patch Set 11 : For review. #

Patch Set 12 : For review. #

Total comments: 14

Patch Set 13 : #

Patch Set 14 : For review. #

Total comments: 11

Patch Set 15 : For review. #

Total comments: 11

Patch Set 16 : For review. #

Total comments: 6

Patch Set 17 : For review. #

Patch Set 18 : For review. #

Total comments: 6

Patch Set 19 : For submitting. #

Patch Set 20 : For submitting. #

Patch Set 21 : For submitting. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+219 lines, -6 lines) Patch
M sync/engine/syncer_proto_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +3 lines, -0 lines 0 comments Download
M sync/engine/traffic_logger.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -4 lines 0 comments Download
A sync/engine/traffic_recorder.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +75 lines, -0 lines 0 comments Download
A sync/engine/traffic_recorder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +81 lines, -0 lines 0 comments Download
A sync/engine/traffic_recorder_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +42 lines, -0 lines 0 comments Download
M sync/sessions/sync_session_context.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +8 lines, -0 lines 0 comments Download
M sync/sessions/sync_session_context.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +7 lines, -2 lines 0 comments Download
M sync/sync.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (0 generated)
lipalani1
Please review.
8 years, 9 months ago (2012-03-21 23:42:28 UTC) #1
akalin
http://codereview.chromium.org/9732008/diff/2010/sync/engine/traffic_logger.cc File sync/engine/traffic_logger.cc (right): http://codereview.chromium.org/9732008/diff/2010/sync/engine/traffic_logger.cc#newcode34 sync/engine/traffic_logger.cc:34: static const unsigned int kMaxMessageSize = 100 * 1024; ...
8 years, 9 months ago (2012-03-22 20:27:28 UTC) #2
lipalani1
PTAL The next and final patch is ready at http://codereview.chromium.org/9826035/ which might explain how I ...
8 years, 9 months ago (2012-03-23 00:03:11 UTC) #3
akalin
http://codereview.chromium.org/9732008/diff/2010/sync/engine/traffic_logger.cc File sync/engine/traffic_logger.cc (right): http://codereview.chromium.org/9732008/diff/2010/sync/engine/traffic_logger.cc#newcode51 sync/engine/traffic_logger.cc:51: void AddTrafficToQueue(std::queue<TrafficRecord>* traffic_recorder, On 2012/03/23 00:03:11, lipalani1 wrote: > ...
8 years, 9 months ago (2012-03-23 00:58:50 UTC) #4
lipalani1
PTAL. http://codereview.chromium.org/9732008/diff/2010/sync/engine/traffic_logger.cc File sync/engine/traffic_logger.cc (right): http://codereview.chromium.org/9732008/diff/2010/sync/engine/traffic_logger.cc#newcode51 sync/engine/traffic_logger.cc:51: void AddTrafficToQueue(std::queue<TrafficRecord>* traffic_recorder, I did not want the ...
8 years, 9 months ago (2012-03-26 21:25:21 UTC) #5
akalin
http://codereview.chromium.org/9732008/diff/2010/sync/engine/traffic_logger.h File sync/engine/traffic_logger.h (right): http://codereview.chromium.org/9732008/diff/2010/sync/engine/traffic_logger.h#newcode46 sync/engine/traffic_logger.h:46: void LogClientToServerMessage(const sync_pb::ClientToServerMessage& msg, On 2012/03/26 21:25:21, lipalani1 wrote: ...
8 years, 9 months ago (2012-03-27 18:18:45 UTC) #6
lipalani1
PTAL.
8 years, 9 months ago (2012-03-27 20:13:49 UTC) #7
akalin
more comments http://codereview.chromium.org/9732008/diff/20001/sync/engine/traffic_recorder.cc File sync/engine/traffic_recorder.cc (right): http://codereview.chromium.org/9732008/diff/20001/sync/engine/traffic_recorder.cc#newcode7 sync/engine/traffic_recorder.cc:7: #include <queue> omit <queue> (not needed anymore) ...
8 years, 9 months ago (2012-03-27 20:21:04 UTC) #8
akalin
http://codereview.chromium.org/9732008/diff/20001/sync/engine/traffic_recorder.cc File sync/engine/traffic_recorder.cc (right): http://codereview.chromium.org/9732008/diff/20001/sync/engine/traffic_recorder.cc#newcode53 sync/engine/traffic_recorder.cc:53: while (records_.size() >= browser_sync::kMaxMessages) { On 2012/03/27 20:21:04, akalin ...
8 years, 9 months ago (2012-03-27 20:24:43 UTC) #9
lipalani1
PTAL. Includes tests. http://codereview.chromium.org/9732008/diff/20001/sync/engine/traffic_recorder.cc File sync/engine/traffic_recorder.cc (right): http://codereview.chromium.org/9732008/diff/20001/sync/engine/traffic_recorder.cc#newcode7 sync/engine/traffic_recorder.cc:7: #include <queue> On 2012/03/27 20:21:04, akalin ...
8 years, 9 months ago (2012-03-27 21:08:56 UTC) #10
akalin
More comments. No need to rush, just make sure to get it right. http://codereview.chromium.org/9732008/diff/20002/sync/engine/traffic_recorder.h File ...
8 years, 9 months ago (2012-03-27 23:53:44 UTC) #11
lipalani1
Richard - since Fred is in vacation I think you are the best person to ...
8 years, 9 months ago (2012-03-29 00:23:13 UTC) #12
akalin
http://codereview.chromium.org/9732008/diff/20002/sync/engine/traffic_recorder_unittest.cc File sync/engine/traffic_recorder_unittest.cc (right): http://codereview.chromium.org/9732008/diff/20002/sync/engine/traffic_recorder_unittest.cc#newcode31 sync/engine/traffic_recorder_unittest.cc:31: while ((unsigned int)response.ByteSize() < kMaxMessageSize) { On 2012/03/29 00:23:13, ...
8 years, 8 months ago (2012-03-29 08:13:13 UTC) #13
rlarocque
Here are my comments. Though it seems Fred might still be the main reviewer. Feel ...
8 years, 8 months ago (2012-03-29 17:56:21 UTC) #14
lipalani1
PTAL. http://codereview.chromium.org/9732008/diff/28001/sync/engine/traffic_recorder.cc File sync/engine/traffic_recorder.cc (right): http://codereview.chromium.org/9732008/diff/28001/sync/engine/traffic_recorder.cc#newcode65 sync/engine/traffic_recorder.cc:65: TrafficRecord record(message, type, truncated); this is only one ...
8 years, 8 months ago (2012-03-29 18:39:29 UTC) #15
akalin
Couldn't resist a few more suggestions, but I leave the final review to Richard. http://codereview.chromium.org/9732008/diff/28001/sync/engine/traffic_recorder.cc ...
8 years, 8 months ago (2012-03-29 18:54:06 UTC) #16
lipalani1
PTAL. All comments fixed. Fred - cool idea and it is implemented. The one liner ...
8 years, 8 months ago (2012-03-29 19:28:28 UTC) #17
akalin
LGTM! http://codereview.chromium.org/9732008/diff/29017/sync/engine/traffic_recorder.cc File sync/engine/traffic_recorder.cc (right): http://codereview.chromium.org/9732008/diff/29017/sync/engine/traffic_recorder.cc#newcode59 sync/engine/traffic_recorder.cc:59: if ((unsigned int)msg.ByteSize() >= max_message_size_) { static_cast<> here ...
8 years, 8 months ago (2012-03-29 19:46:32 UTC) #18
rlarocque
http://codereview.chromium.org/9732008/diff/28001/sync/engine/traffic_recorder.cc File sync/engine/traffic_recorder.cc (right): http://codereview.chromium.org/9732008/diff/28001/sync/engine/traffic_recorder.cc#newcode65 sync/engine/traffic_recorder.cc:65: TrafficRecord record(message, type, truncated); On 2012/03/29 18:54:06, akalin wrote: ...
8 years, 8 months ago (2012-03-29 21:38:56 UTC) #19
lipalani1
ah.. Richard you are right. For some reason I thought swap would call string's swap ...
8 years, 8 months ago (2012-03-29 21:55:55 UTC) #20
tim (not reviewing)
http://codereview.chromium.org/9732008/diff/29017/sync/sessions/sync_session_context.h File sync/sessions/sync_session_context.h (right): http://codereview.chromium.org/9732008/diff/29017/sync/sessions/sync_session_context.h#newcode185 sync/sessions/sync_session_context.h:185: browser_sync::TrafficRecorder traffic_recorder_; Please see my comment on http://codereview.chromium.org/9826035/. I ...
8 years, 8 months ago (2012-03-29 22:02:22 UTC) #21
rlarocque
On 2012/03/29 21:55:55, lipalani1 wrote: > ah.. Richard you are right. For some reason I ...
8 years, 8 months ago (2012-03-29 22:18:32 UTC) #22
lipalani1
Comments addressed and submitting. I wait until later tonight or Tim responds before hitting the ...
8 years, 8 months ago (2012-03-30 00:33:24 UTC) #23
tim (not reviewing)
Yup, LGTM
8 years, 8 months ago (2012-03-30 00:36:20 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/lipalani@chromium.org/9732008/40001
8 years, 8 months ago (2012-03-30 00:38:01 UTC) #25
commit-bot: I haz the power
Try job failure for 9732008-40001 (retry) on mac_rel for step "compile" (clobber build). It's a ...
8 years, 8 months ago (2012-03-30 01:17:35 UTC) #26
akalin
On 2012/03/29 21:38:56, rlarocque wrote: > That's a clever solution, but I think it requires ...
8 years, 8 months ago (2012-03-30 01:28:37 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/lipalani@chromium.org/9732008/50002
8 years, 8 months ago (2012-03-30 20:37:45 UTC) #28
commit-bot: I haz the power
Try job failure for 9732008-50002 (retry) on mac_rel for step "compile" (clobber build). It's a ...
8 years, 8 months ago (2012-03-30 21:48:39 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/lipalani@chromium.org/9732008/55003
8 years, 8 months ago (2012-03-30 22:00:48 UTC) #30
commit-bot: I haz the power
Change committed as 130001
8 years, 8 months ago (2012-03-31 00:03:41 UTC) #31
Mihai Parparita -not on Chrome
8 years, 8 months ago (2012-03-31 00:54:02 UTC) #32
Note that traffic_recorder_unittest.cc was checked in with the executable
bit set, which caused this buildbot failure:

http://build.chromium.org/p/chromium/builders/Linux/builds/21881/steps/check_...

Fixed with http://crrev.com/130015

Mihai

On Fri, Mar 30, 2012 at 5:03 PM, <commit-bot@chromium.org> wrote:

> Change committed as 130001
>
>
http://codereview.chromium.**org/9732008/<http://codereview.chromium.org/9732...
>

Powered by Google App Engine
This is Rietveld 408576698