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

Side by Side Diff: net/base/load_timing_info.h

Issue 11428150: LoadTiming implementation in net, part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: tiny typo fix Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | net/base/load_timing_info.cc » ('j') | net/socket/connect_timing.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
mmenke 2013/01/04 16:33:42 I left these as 2013, since there are no clear gui
eroman 2013/01/05 00:30:15 Sounds fine to me.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NET_BASE_LOAD_TIMING_INFO_H_
6 #define NET_BASE_LOAD_TIMING_INFO_H_
7
8 #include "base/basictypes.h"
9 #include "base/time.h"
10 #include "net/base/net_export.h"
11
12 namespace net {
13
14 // All events that do not apply to a request have null times. For non-HTTP
15 // requests, all times other than the request_start times are null.
16 //
17 // The general order for events is:
18 // request_start
19 // proxy_start
20 // proxy_end
21 // *dns_start
22 // *dns_end
23 // *connect_start
24 // *ssl_start
25 // *ssl_end
26 // *connect_end
27 // send_start
28 // send_end
29 // receive_headers_end
30 //
31 // Those times without an asterisk are computed by the URLRequest, or by objects
32 // it directly creates and always owns. Those with an asterisk are computed
33 // by the connection attempt itself. Since the connection attempt may be
34 // started before a URLRequest, the starred times may occur before, during, or
35 // after the request_start and proxy events.
eroman 2013/01/05 00:30:15 Thanks, I prefer the new wording!
36 struct NET_EXPORT LoadTimingInfo {
37 LoadTimingInfo();
38 ~LoadTimingInfo();
39
40 // True if the socket was reused. When true, DNS, connect, and SSL times
41 // will all be null. When false, those times may be null, too, for non-HTTP
42 // requests, or when they don't apply to a request.
43 bool socket_reused;
44
45 // Unique socket ID, can be used to identify requests served by the same
46 // socket.
47 // TODO(mmenke): Do something reasonable for SPDY proxies.
48 uint32 socket_log_id;
49
50 // Start time as a base::Time, so times can be coverted into actual times.
51 // Other times are recorded as TimeTicks so they are not affected by clock
52 // changes.
53 base::Time request_start_time;
54
55 base::TimeTicks request_start;
56
57 // The time spent determing which proxy to use. Null when there is no PAC.
58 base::TimeTicks proxy_resolve_start;
59 base::TimeTicks proxy_resolve_end;
60
61 // The time spent looking up the host's DNS address. Null for requests that
62 // used proxies to look up the DNS address. Also null for SOCKS4 proxies,
63 // since the DNS address is only looked up after the connection is
64 // established, which results in unexpected event ordering.
65 // TODO(mmenke): The SOCKS4 event ordering could be refactored to allow
66 // these times to be non-null.
67 base::TimeTicks dns_start;
68 base::TimeTicks dns_end;
69
70 // The time spent establishing the connection. Connect time includes proxy
71 // connect times (Though not proxy_resolve times), DNS lookup times, time
72 // spent waiting in certain queues, TCP, and SSL time.
73 // TODO(mmenke): For proxies, this includes time spent blocking on higher
74 // level socket pools. Fix this.
75 // TODO(mmenke): Retried connections to the same server should apparently be
76 // included in this time. Since the network stack has multiple
77 // notions of a "retry", handled at different levels, this may
78 // not be worth worrying about - backup jobs, reused socket
79 // failure, multiple round authentication.
80 base::TimeTicks connect_start;
81 base::TimeTicks connect_end;
82
83 // The time when the SSL handshake started / completed. For non-HTTPS requests
84 // these are null. These times are only for the SSL connection to the final
85 // destination server, not an SSL/SPDY proxy.
86 base::TimeTicks ssl_start;
87 base::TimeTicks ssl_end;
88
89 // The time that sending HTTP request started / ended.
90 base::TimeTicks send_start;
91 base::TimeTicks send_end;
92
93 // The time at which the end of the HTTP headers were received.
94 base::TimeTicks receive_headers_end;
95 };
96
97 } // namespace net
98
99 #endif // NET_BASE_LOAD_TIMING_INFO_H_
OLDNEW
« no previous file with comments | « no previous file | net/base/load_timing_info.cc » ('j') | net/socket/connect_timing.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698