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

Issue 4067002: First pass at adding http/backend cache to NetLog (Closed)

Created:
10 years, 2 months ago by mmenke
Modified:
9 years, 7 months ago
CC:
chromium-reviews, michaeln, cbentzel+watch_chromium.org, arv (Not doing code reviews), darin-cc_chromium.org, ben+cc_chromium.org
Visibility:
Public.

Description

First pass at adding http/backend cache events to the NetLog. Adds sources and events for ActiveCacheEntry and EntryImpl objects, as well as adding cache read/write events to HttpCacheTransactions. Most new read/write events are only logged when NetLog logging mode is set to log all events. Also, net-internals now merges begin and end events that have parameters, as long as only one of them has parameters. I think this increases readability, at the cost of making it a little more difficult to follow timings with just the "st" values. BUG=59382 TEST=none yet, other than updates to existing tests. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=70618

Patch Set 1 : '' #

Patch Set 2 : '' #

Patch Set 3 : Oops #

Patch Set 4 : Removing class I decided not to use #

Total comments: 13

Patch Set 5 : ActiveEntry logging removed #

Patch Set 6 : Add back mysteriously missing files #

Total comments: 23

Patch Set 7 : Response to comments, minor parameter reordering for consistency. #

Patch Set 8 : Remove last traces of ACTIVE_ENTRY sources #

Patch Set 9 : Fix a couple comments, and switch metadata write to WRITE_INFO, and another entry_ check #

Patch Set 10 : Final cleanup? #

Patch Set 11 : Minor cleanup #

Total comments: 22

Patch Set 12 : Response to (most of) eroman's comments #

Patch Set 13 : Added bytes_copied parameter to read/write completion events #

Patch Set 14 : Sync with trunk #

Patch Set 15 : Minor lint-ish fixes #

Total comments: 2

Patch Set 16 : CapturingNetLog lock fix #

Patch Set 17 : Lint fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+613 lines, -137 lines) Patch
M chrome/browser/net/connection_tester.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/net/passive_log_collector.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +17 lines, -0 lines 0 comments Download
M chrome/browser/net/passive_log_collector.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +26 lines, -0 lines 0 comments Download
M chrome/browser/resources/net_internals/logviewpainter.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +32 lines, -33 lines 0 comments Download
M chrome/browser/resources/net_internals/main.css View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/resources/net_internals/sourceentry.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/service/net/service_url_request_context.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/plugin/plugin_test.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome_frame/metrics_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome_frame/test/test_server_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M net/base/capturing_net_log.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +7 lines, -0 lines 0 comments Download
M net/base/capturing_net_log.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +14 lines, -2 lines 0 comments Download
M net/base/net_log.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +9 lines, -0 lines 0 comments Download
M net/base/net_log.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +14 lines, -0 lines 0 comments Download
M net/base/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 +68 lines, -5 lines 0 comments Download
M net/base/net_log_source_type_list.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -1 line 0 comments Download
M net/disk_cache/backend_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +11 lines, -3 lines 0 comments Download
M net/disk_cache/backend_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 11 chunks +20 lines, -9 lines 0 comments Download
M net/disk_cache/backend_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 8 chunks +12 lines, -10 lines 0 comments Download
M net/disk_cache/disk_cache.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -1 line 0 comments Download
M net/disk_cache/disk_cache_perftest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -2 lines 0 comments Download
M net/disk_cache/disk_cache_test_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -3 lines 0 comments Download
M net/disk_cache/disk_cache_test_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M net/disk_cache/entry_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +18 lines, -0 lines 0 comments Download
M net/disk_cache/entry_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 12 chunks +156 lines, -9 lines 0 comments Download
M net/disk_cache/sparse_control.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +50 lines, -2 lines 0 comments Download
M net/disk_cache/stress_cache.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_cache.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +8 lines, -3 lines 0 comments Download
M net/http/http_cache.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +14 lines, -8 lines 0 comments Download
M net/http/http_cache_transaction.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M net/http/http_cache_transaction.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 15 chunks +51 lines, -9 lines 0 comments Download
M net/http/http_cache_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 21 chunks +45 lines, -27 lines 0 comments Download
M net/http/http_network_session.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M net/proxy/proxy_script_fetcher_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M net/spdy/spdy_test_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M net/tools/crash_cache/crash_cache.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +4 lines, -4 lines 0 comments Download
M net/tools/dump_cache/upgrade.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -2 lines 0 comments Download
M net/url_request/url_request_unittest.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M net/url_request/view_cache_helper_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M webkit/appcache/appcache_disk_cache.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 17 (0 generated)
mmenke
It's not showing up for some reason, but first patch set was green on all ...
10 years ago (2010-12-10 19:09:11 UTC) #1
rvargas (doing something else)
I have only reviewed a few files so far... http://codereview.chromium.org/4067002/diff/182003/net/http/http_cache.h File net/http/http_cache.h (right): http://codereview.chromium.org/4067002/diff/182003/net/http/http_cache.h#newcode91 net/http/http_cache.h:91: ...
10 years ago (2010-12-11 00:29:00 UTC) #2
mmenke
http://codereview.chromium.org/4067002/diff/182003/net/http/http_cache.h File net/http/http_cache.h (right): http://codereview.chromium.org/4067002/diff/182003/net/http/http_cache.h#newcode218 net/http/http_cache.h:218: BoundNetLog net_log; On 2010/12/11 00:29:01, rvargas wrote: > I'm ...
10 years ago (2010-12-11 01:51:05 UTC) #3
rvargas (doing something else)
Looks good. We also need similar logs for the memory only version: mem_backend_impl.cc and mem_entry_impl.cc, ...
10 years ago (2010-12-13 23:34:38 UTC) #4
mmenke
Just a pair of quick responses. I'll update the code tomorrow. http://codereview.chromium.org/4067002/diff/182003/net/http/http_cache_transaction.cc File net/http/http_cache_transaction.cc (right): ...
10 years ago (2010-12-14 00:04:43 UTC) #5
rvargas (doing something else)
http://codereview.chromium.org/4067002/diff/182003/net/http/http_cache_transaction.cc File net/http/http_cache_transaction.cc (right): http://codereview.chromium.org/4067002/diff/182003/net/http/http_cache_transaction.cc#newcode1137 net/http/http_cache_transaction.cc:1137: if (net_log_.IsLoggingAllEvents()) On 2010/12/14 00:04:43, Matt Menke wrote: > ...
10 years ago (2010-12-14 00:14:26 UTC) #6
mmenke
I will indeed add logging for the memory stuff in another CL. Skimming over the ...
10 years ago (2010-12-14 17:53:43 UTC) #7
rvargas (doing something else)
LGTM (fell free to leave the small changes to sparse control for another CL). For ...
10 years ago (2010-12-14 19:48:57 UTC) #8
rvargas (doing something else)
s/fell/feel On 2010/12/14 19:48:57, rvargas wrote: > LGTM (fell free to leave the small changes ...
10 years ago (2010-12-14 19:49:36 UTC) #9
mmenke
http://codereview.chromium.org/4067002/diff/251001/net/disk_cache/sparse_control.cc File net/disk_cache/sparse_control.cc (right): http://codereview.chromium.org/4067002/diff/251001/net/disk_cache/sparse_control.cc#newcode226 net/disk_cache/sparse_control.cc:226: entry_->net_log().BeginEvent(net::NetLog::TYPE_SPARSE_CONTROL, NULL); > Yeah, no (real) need to have ...
10 years ago (2010-12-14 20:10:21 UTC) #10
eroman
Apologies for not commenting yet! (was shortly before I went on vacation). I'm going to ...
10 years ago (2010-12-23 05:18:33 UTC) #11
mmenke
On 2010/12/23 05:18:33, eroman wrote: > Apologies for not commenting yet! (was shortly before I ...
10 years ago (2010-12-23 14:50:51 UTC) #12
eroman
I defer to Ricardo for the caching-specific logging. Overall looks good. http://codereview.chromium.org/4067002/diff/271001/chrome/browser/resources/net_internals/logviewpainter.js File chrome/browser/resources/net_internals/logviewpainter.js (right): ...
9 years, 11 months ago (2011-01-05 02:39:05 UTC) #13
mmenke
http://codereview.chromium.org/4067002/diff/271001/chrome/browser/resources/net_internals/logviewpainter.js File chrome/browser/resources/net_internals/logviewpainter.js (right): http://codereview.chromium.org/4067002/diff/271001/chrome/browser/resources/net_internals/logviewpainter.js#newcode54 chrome/browser/resources/net_internals/logviewpainter.js:54: (!beginEntry.orig.params || !beginEntry.end.orig.params) && On 2011/01/05 02:39:06, eroman wrote: ...
9 years, 11 months ago (2011-01-05 16:32:25 UTC) #14
eroman
http://codereview.chromium.org/4067002/diff/289044/net/base/capturing_net_log.cc File net/base/capturing_net_log.cc (right): http://codereview.chromium.org/4067002/diff/289044/net/base/capturing_net_log.cc#newcode44 net/base/capturing_net_log.cc:44: return log_level_; Should hold |lock_| when reading this.
9 years, 11 months ago (2011-01-05 19:17:48 UTC) #15
mmenke
Thanks. http://codereview.chromium.org/4067002/diff/289044/net/base/capturing_net_log.cc File net/base/capturing_net_log.cc (right): http://codereview.chromium.org/4067002/diff/289044/net/base/capturing_net_log.cc#newcode44 net/base/capturing_net_log.cc:44: return log_level_; On 2011/01/05 19:17:48, eroman wrote: > ...
9 years, 11 months ago (2011-01-05 19:20:33 UTC) #16
eroman
9 years, 11 months ago (2011-01-05 19:23:36 UTC) #17
LGTM

Powered by Google App Engine
This is Rietveld 408576698