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

Issue 2621983004: Improve HttpStreamFactory NetLog events (Closed)

Created:
3 years, 11 months ago by xunjieli
Modified:
3 years, 10 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, eroman
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Improve HttpStreamFactory NetLog events This CL introduces a SourceType for JobController to better account for orphaned and preconnect jobs: (1) For orphaned job, it will be correctly closed when the job completes. (2) For preconnect job, it will now appear in net-internals because we take NetLog from HttpNetworkSession and log events there. Before this CL, because preconnects do not have an associated stream request, their events are not logged and it is hard to see whether a socket is created due to preconnects. BUG=679968 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2621983004 Cr-Commit-Position: refs/heads/master@{#446985} Committed: https://chromium.googlesource.com/chromium/src/+/9255195315efa671012f0bd0da1afe685d70b2f6

Patch Set 1 #

Total comments: 2

Patch Set 2 : Get rid of long-running Source #

Total comments: 23

Patch Set 3 : Rebased #

Patch Set 4 : address Matt's and Eric's comments #

Patch Set 5 : Fix tests #

Patch Set 6 : self review #

Patch Set 7 : self review 2 #

Total comments: 8

Patch Set 8 : Fix lifetime issue #

Patch Set 9 : Address comments on UI and fixed tests #

Total comments: 9

Patch Set 10 : Address Eric and Cherie comments #

Patch Set 11 : Revert inline to Fix compile #

Patch Set 12 : self #

Patch Set 13 : fix test #

Patch Set 14 : Fix SpdyNetworkTransactionTest #

Patch Set 15 : Rebased #

Patch Set 16 : fix compile #

Total comments: 7

Patch Set 17 : Address Bence comments and change back to auto #

Unified diffs Side-by-side diffs Delta from patch set Stats (+154 lines, -105 lines) Patch
M chrome/browser/resources/net_internals/source_entry.js View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M net/http/http_stream_factory_impl.h View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M net/http/http_stream_factory_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +14 lines, -12 lines 0 comments Download
M net/http/http_stream_factory_impl_job_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +9 lines, -5 lines 0 comments Download
M net/http/http_stream_factory_impl_job_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 11 chunks +37 lines, -17 lines 0 comments Download
M net/http/http_stream_factory_impl_job_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 27 chunks +51 lines, -52 lines 0 comments Download
M net/http/http_stream_factory_impl_request_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +17 lines, -14 lines 0 comments Download
M net/log/net_log_event_type_list.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +17 lines, -0 lines 0 comments Download
M net/log/net_log_source_type_list.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M net/quic/chromium/quic_network_transaction_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M net/spdy/spdy_network_transaction_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +5 lines, -3 lines 0 comments Download

Messages

Total messages: 78 (44 generated)
xunjieli
Cherie and Matt: PTAL. This will solve my use cases (differentiate preconnects vs non-preconnects, identify ...
3 years, 11 months ago (2017-01-11 23:10:01 UTC) #7
mmenke
On 2017/01/11 23:10:01, xunjieli wrote: > Cherie and Matt: PTAL. This will solve my use ...
3 years, 11 months ago (2017-01-12 16:32:07 UTC) #9
mmenke
https://codereview.chromium.org/2621983004/diff/60001/net/http/http_stream_factory_impl.cc File net/http/http_stream_factory_impl.cc (right): https://codereview.chromium.org/2621983004/diff/60001/net/http/http_stream_factory_impl.cc#newcode100 net/http/http_stream_factory_impl.cc:100: NetLogSourceType::HTTP_STREAM_FACTORY)) {} This isn't really how sources are currently ...
3 years, 11 months ago (2017-01-12 16:35:08 UTC) #11
xunjieli
https://codereview.chromium.org/2621983004/diff/60001/net/http/http_stream_factory_impl.cc File net/http/http_stream_factory_impl.cc (right): https://codereview.chromium.org/2621983004/diff/60001/net/http/http_stream_factory_impl.cc#newcode100 net/http/http_stream_factory_impl.cc:100: NetLogSourceType::HTTP_STREAM_FACTORY)) {} On 2017/01/12 16:35:08, mmenke wrote: > This ...
3 years, 11 months ago (2017-01-12 18:09:43 UTC) #12
xunjieli
On 2017/01/12 18:09:43, xunjieli wrote: > https://codereview.chromium.org/2621983004/diff/60001/net/http/http_stream_factory_impl.cc > File net/http/http_stream_factory_impl.cc (right): > > https://codereview.chromium.org/2621983004/diff/60001/net/http/http_stream_factory_impl.cc#newcode100 > ...
3 years, 11 months ago (2017-01-17 15:25:46 UTC) #13
mmenke
On 2017/01/17 15:25:46, xunjieli wrote: > On 2017/01/12 18:09:43, xunjieli wrote: > > > https://codereview.chromium.org/2621983004/diff/60001/net/http/http_stream_factory_impl.cc ...
3 years, 11 months ago (2017-01-18 19:43:42 UTC) #14
mmenke
On 2017/01/18 19:43:42, mmenke wrote: > On 2017/01/17 15:25:46, xunjieli wrote: > > On 2017/01/12 ...
3 years, 11 months ago (2017-01-18 19:44:03 UTC) #15
eroman
The general approach looks fine to me. Conceptually I see Source primarily as a way ...
3 years, 11 months ago (2017-01-19 22:31:42 UTC) #16
xunjieli
On 2017/01/19 22:31:42, eroman (slow) wrote: > The general approach looks fine to me. > ...
3 years, 11 months ago (2017-01-20 17:29:39 UTC) #17
xunjieli
Thanks everyone. I reworked the CL to avoid the usage of a long-running source. PTAL. ...
3 years, 11 months ago (2017-01-20 19:42:37 UTC) #19
Zhongyi Shi
Thanks for cook up the CL and improve the NetLog :) https://codereview.chromium.org/2621983004/diff/80001/net/http/http_stream_factory_impl_job_controller.cc File net/http/http_stream_factory_impl_job_controller.cc (right): ...
3 years, 11 months ago (2017-01-20 22:42:11 UTC) #21
xunjieli
https://codereview.chromium.org/2621983004/diff/80001/net/http/http_stream_factory_impl_job_controller.cc File net/http/http_stream_factory_impl_job_controller.cc (right): https://codereview.chromium.org/2621983004/diff/80001/net/http/http_stream_factory_impl_job_controller.cc#newcode76 net/http/http_stream_factory_impl_job_controller.cc:76: net_log_.source().ToEventParametersCallback()); On 2017/01/20 22:42:10, Zhongyi Shi wrote: > I ...
3 years, 11 months ago (2017-01-23 14:24:24 UTC) #22
xunjieli
Matt: a friendly ping. Cherie's on triage duty. Could you do a first pass? Thanks!
3 years, 11 months ago (2017-01-24 14:40:13 UTC) #23
mmenke
On 2017/01/24 14:40:13, xunjieli wrote: > Matt: a friendly ping. Cherie's on triage duty. Could ...
3 years, 11 months ago (2017-01-24 17:44:51 UTC) #24
mmenke
https://codereview.chromium.org/2621983004/diff/80001/net/http/http_stream_factory_impl.cc File net/http/http_stream_factory_impl.cc (right): https://codereview.chromium.org/2621983004/diff/80001/net/http/http_stream_factory_impl.cc#newcode181 net/http/http_stream_factory_impl.cc:181: NetLogWithSource dummy_netlog_with_source; Can just inline NetLogWithSource() in the line ...
3 years, 11 months ago (2017-01-25 19:32:17 UTC) #25
eroman
https://codereview.chromium.org/2621983004/diff/80001/net/http/http_stream_factory_impl.cc File net/http/http_stream_factory_impl.cc (right): https://codereview.chromium.org/2621983004/diff/80001/net/http/http_stream_factory_impl.cc#newcode182 net/http/http_stream_factory_impl.cc:182: JobController* job_controller = side-comment: can you update this to ...
3 years, 11 months ago (2017-01-25 19:55:27 UTC) #26
xunjieli
I believe I have address all comments. Here's a netlog with the suggested edits: https://drive.google.com/open?id=0B_9WseIqRoaFOUhDcDRPdEhQZzA ...
3 years, 11 months ago (2017-01-25 21:41:49 UTC) #27
mmenke
Looks good! Just one concern about lifetimes. https://codereview.chromium.org/2621983004/diff/180001/net/http/http_stream_factory_impl.cc File net/http/http_stream_factory_impl.cc (right): https://codereview.chromium.org/2621983004/diff/180001/net/http/http_stream_factory_impl.cc#newcode162 net/http/http_stream_factory_impl.cc:162: auto job_controller ...
3 years, 11 months ago (2017-01-26 20:47:43 UTC) #28
mmenke
Two other things, looking at the log: Can we give a description to the HTTP_STREAM_JOB_CONTROLLERS ...
3 years, 11 months ago (2017-01-26 20:54:16 UTC) #29
xunjieli
> Two other things, looking at the log: > Can we give a description to ...
3 years, 11 months ago (2017-01-26 22:37:43 UTC) #31
Zhongyi Shi
Looks good. I was looking at the net logs you provided in #31(controller5.json) and notices ...
3 years, 11 months ago (2017-01-26 22:57:43 UTC) #32
xunjieli
On 2017/01/26 22:57:43, Zhongyi Shi wrote: > Looks good. > > I was looking at ...
3 years, 11 months ago (2017-01-26 23:06:33 UTC) #33
eroman
lgtm https://codereview.chromium.org/2621983004/diff/180001/net/http/http_stream_factory_impl.cc File net/http/http_stream_factory_impl.cc (right): https://codereview.chromium.org/2621983004/diff/180001/net/http/http_stream_factory_impl.cc#newcode162 net/http/http_stream_factory_impl.cc:162: auto job_controller = base::MakeUnique<JobController>( On 2017/01/26 20:47:43, mmenke ...
3 years, 11 months ago (2017-01-26 23:37:00 UTC) #34
Zhongyi Shi
Almost there. Just one extra question on the creation of the JOB_CONTROLLER net log. https://codereview.chromium.org/2621983004/diff/220001/net/http/http_stream_factory_impl_job_controller.cc ...
3 years, 11 months ago (2017-01-27 00:50:32 UTC) #35
xunjieli
Thanks! https://codereview.chromium.org/2621983004/diff/220001/net/http/http_stream_factory_impl_job_controller.cc File net/http/http_stream_factory_impl_job_controller.cc (right): https://codereview.chromium.org/2621983004/diff/220001/net/http/http_stream_factory_impl_job_controller.cc#newcode43 net/http/http_stream_factory_impl_job_controller.cc:43: std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); On 2017/01/26 23:37:00, eroman (slow) ...
3 years, 10 months ago (2017-01-27 14:35:31 UTC) #38
xunjieli
https://codereview.chromium.org/2621983004/diff/220001/net/http/http_stream_factory_impl_job_controller.cc File net/http/http_stream_factory_impl_job_controller.cc (right): https://codereview.chromium.org/2621983004/diff/220001/net/http/http_stream_factory_impl_job_controller.cc#newcode647 net/http/http_stream_factory_impl_job_controller.cc:647: return &net_log_; On 2017/01/27 14:35:30, xunjieli wrote: > On ...
3 years, 10 months ago (2017-01-27 15:01:34 UTC) #43
mmenke
LGTM https://codereview.chromium.org/2621983004/diff/180001/net/http/http_stream_factory_impl.cc File net/http/http_stream_factory_impl.cc (right): https://codereview.chromium.org/2621983004/diff/180001/net/http/http_stream_factory_impl.cc#newcode162 net/http/http_stream_factory_impl.cc:162: auto job_controller = base::MakeUnique<JobController>( On 2017/01/26 23:36:59, eroman ...
3 years, 10 months ago (2017-01-27 15:45:18 UTC) #50
Zhongyi Shi
lgtm
3 years, 10 months ago (2017-01-27 17:52:59 UTC) #53
xunjieli
bnc@: PTAL at net/spdy/spdy_network_transaction_unittest.cc Thanks!
3 years, 10 months ago (2017-01-27 19:49:21 UTC) #59
Bence
LGTM. https://codereview.chromium.org/2621983004/diff/360001/net/http/http_stream_factory_impl_job_controller.cc File net/http/http_stream_factory_impl_job_controller.cc (right): https://codereview.chromium.org/2621983004/diff/360001/net/http/http_stream_factory_impl_job_controller.cc#newcode44 net/http/http_stream_factory_impl_job_controller.cc:44: std::unique_ptr<base::DictionaryValue> dict = Optional: feel free to use ...
3 years, 10 months ago (2017-01-28 02:08:25 UTC) #70
Bence
LGTM.
3 years, 10 months ago (2017-01-28 02:08:26 UTC) #71
xunjieli
Thanks for the review! Matt and Eric: Bence pointed out that "base/memory/ptr_util.h" suggests to use ...
3 years, 10 months ago (2017-01-30 14:08:39 UTC) #72
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/2621983004/380001
3 years, 10 months ago (2017-01-30 14:09:00 UTC) #75
commit-bot: I haz the power
3 years, 10 months ago (2017-01-30 15:33:52 UTC) #78
Message was sent while issue was closed.
Committed patchset #17 (id:380001) as
https://chromium.googlesource.com/chromium/src/+/9255195315efa671012f0bd0da1a...

Powered by Google App Engine
This is Rietveld 408576698