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

Issue 363025: Improve the display of LoadLogs when truncation occurs.... (Closed)

Created:
11 years, 1 month ago by eroman
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com, darin (slow to review), Paweł Hajdan Jr.
Visibility:
Public.

Description

Improve the display of LoadLogs when truncation occurs. Rather than drop all subsequent entries, we now preserve the final entry that was appended to the log. This way, even if entries have been dropped, we can still infer what the total time was, and what the exit condition was. Also makes LoadLog take the bound as a required parameter. BUG=none TEST=LoadLogUtilTest.DisplayOfTruncated Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=31274

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 7

Patch Set 3 : Make the size bound a required parameter #

Patch Set 4 : fix other comments #

Patch Set 5 : allow passing -1 to mean unbounded #

Total comments: 2

Patch Set 6 : Change -1 to be a constant instead #

Unified diffs Side-by-side diffs Delta from patch set Stats (+180 lines, -108 lines) Patch
M net/base/host_resolver_impl_unittest.cc View 3 4 5 5 chunks +6 lines, -6 lines 0 comments Download
M net/base/load_log.h View 1 2 3 4 5 4 chunks +22 lines, -8 lines 0 comments Download
M net/base/load_log.cc View 1 2 3 4 5 2 chunks +14 lines, -7 lines 0 comments Download
M net/base/load_log_event_type_list.h View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
M net/base/load_log_unittest.cc View 1 2 5 chunks +41 lines, -28 lines 0 comments Download
M net/base/load_log_util.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M net/base/load_log_util_unittest.cc View 1 2 3 chunks +23 lines, -2 lines 0 comments Download
M net/http/http_cache_unittest.cc View 3 4 5 3 chunks +3 lines, -3 lines 0 comments Download
M net/proxy/init_proxy_resolver_unittest.cc View 3 4 5 3 chunks +3 lines, -3 lines 0 comments Download
M net/proxy/proxy_resolver_v8_unittest.cc View 3 4 5 4 chunks +4 lines, -4 lines 0 comments Download
M net/proxy/proxy_service.cc View 3 4 5 2 chunks +3 lines, -1 line 0 comments Download
M net/proxy/proxy_service_unittest.cc View 3 4 5 3 chunks +3 lines, -3 lines 0 comments Download
M net/proxy/single_threaded_proxy_resolver.cc View 3 4 5 3 chunks +15 lines, -7 lines 0 comments Download
M net/proxy/single_threaded_proxy_resolver_unittest.cc View 3 4 5 1 chunk +1 line, -1 line 0 comments Download
net/socket/client_socket_pool_base.cc View 3 4 2 chunks +4 lines, -1 line 0 comments Download
M net/socket/client_socket_pool_base_unittest.cc View 3 4 5 10 chunks +11 lines, -11 lines 0 comments Download
M net/socket/socks5_client_socket_unittest.cc View 3 4 5 7 chunks +7 lines, -7 lines 0 comments Download
M net/socket/socks_client_socket_unittest.cc View 3 4 5 7 chunks +7 lines, -7 lines 0 comments Download
M net/socket/ssl_client_socket_unittest.cc View 3 4 5 3 chunks +3 lines, -3 lines 0 comments Download
M net/socket/tcp_client_socket_unittest.cc View 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M net/url_request/url_request.cc View 3 4 2 chunks +4 lines, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
eroman
http://codereview.chromium.org/363025/diff/3001/4006 File net/base/load_log.h (right): http://codereview.chromium.org/363025/diff/3001/4006#newcode59 Line 59: LoadLog(size_t max_num_entries = 40); our style guide does ...
11 years, 1 month ago (2009-11-05 07:37:14 UTC) #1
willchan no longer on Chromium
http://codereview.chromium.org/363025/diff/3001/4006 File net/base/load_log.h (right): http://codereview.chromium.org/363025/diff/3001/4006#newcode59 Line 59: LoadLog(size_t max_num_entries = 40); On 2009/11/05 07:37:15, eroman ...
11 years, 1 month ago (2009-11-05 22:59:01 UTC) #2
willchan no longer on Chromium
Can we not just increase the number of entries we use for LoadLog? It looks ...
11 years, 1 month ago (2009-11-05 23:13:26 UTC) #3
eroman
http://codereview.chromium.org/363025/diff/3001/4002 File net/base/load_log.cc (right): http://codereview.chromium.org/363025/diff/3001/4002#newcode30 Line 30: events_.reserve(std::min(static_cast<size_t>(20), max_num_entries_ / 2)); On 2009/11/05 23:13:26, willchan ...
11 years, 1 month ago (2009-11-06 02:39:02 UTC) #4
eroman
OK, i made 1 more change, to allow passing in -1 to mean "unbounded". Ready ...
11 years, 1 month ago (2009-11-06 02:57:12 UTC) #5
eroman
Made the suggested change to use a constant in place of -1.
11 years, 1 month ago (2009-11-06 07:20:20 UTC) #6
willchan no longer on Chromium
lgtm http://codereview.chromium.org/363025/diff/7038/7040 File net/base/load_log.cc (right): http://codereview.chromium.org/363025/diff/7038/7040#newcode12 Line 12: DCHECK(max_num_entries == -1 || max_num_entries > 0); ...
11 years, 1 month ago (2009-11-06 18:38:48 UTC) #7
eroman
http://codereview.chromium.org/363025/diff/7038/7040 File net/base/load_log.cc (right): http://codereview.chromium.org/363025/diff/7038/7040#newcode12 Line 12: DCHECK(max_num_entries == -1 || max_num_entries > 0); On ...
11 years, 1 month ago (2009-11-06 19:16:26 UTC) #8
willchan no longer on Chromium
11 years, 1 month ago (2009-11-06 19:31:19 UTC) #9
Heh, that was an old cached draft comment from last night :P  Sounds good then.

On Fri, Nov 6, 2009 at 11:16 AM,  <eroman@chromium.org> wrote:
>
> http://codereview.chromium.org/363025/diff/7038/7040
> File net/base/load_log.cc (right):
>
> http://codereview.chromium.org/363025/diff/7038/7040#newcode12
> Line 12: DCHECK(max_num_entries == -1 || max_num_entries > 0);
> On 2009/11/06 18:38:48, willchan wrote:
>>
>> How about DCHECK_GE(max_num_entries, -1)?
>
> You must have reviewed an old patchset; in the latest this is:
>
> DCHECK_GT(max_num_entries, 0u);
>
> http://codereview.chromium.org/363025
>

Powered by Google App Engine
This is Rietveld 408576698