|
OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
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 LOAD_TIMING_INFO_H_ | |
eroman
2012/12/14 04:08:35
Shouldn't this be NET_BASE_LOAD_TIMING_INFO_H_ ?
mmenke
2012/12/14 13:36:12
Done. Odd that the linter didn't catch this.
| |
6 #define 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 are NULL. For non-HTTP requests, | |
15 // 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 // *connect_end | |
26 // send_start | |
27 // send_end | |
28 // receive_headers_end | |
29 // | |
30 // Due to preconnect, late-binding, and cancelled requests, a request may use a | |
eroman
2012/12/14 04:08:35
I found this paragraph challenging to read. Not su
mmenke
2012/12/14 13:36:12
I've tried to make it easier to understand, but it
| |
31 // fresh connection that was started before the request was issued. In this | |
32 // case, while the events without a * will always appear in the same order | |
33 // relative to each other, and those with a * will as well, starred events may | |
34 // occur before, during, or after request_start and proxy events. socket_reused | |
35 // will be false in this case. | |
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, if the socket | |
42 // was preconnected. | |
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 base::Time request_start_time; | |
eroman
2012/12/14 04:08:35
Why is this a Time whereas the rest are TimeTicks?
mmenke
2012/12/14 13:36:12
Added a comment. This is the same thing LoadTimin
| |
51 base::TimeTicks request_start; | |
52 | |
53 // The time spent determing which proxy to use. | |
54 base::TimeTicks proxy_start; | |
eroman
2012/12/14 04:08:35
Nit: I would suggest calling this proxy_resolve_st
mmenke
2012/12/14 13:36:12
SGTM. Done.
| |
55 base::TimeTicks proxy_end; | |
56 | |
57 // The time spent looking up the host's DNS address. NULL for requests that | |
58 // used proxies to look up the DNS address. Also NULL for SOCKS4 proxies, | |
eroman
2012/12/14 04:08:35
Seems we *could* include this for SOCKS4. If neede
mmenke
2012/12/14 13:36:12
Sounds reasonable to me. Looked to me like it wou
| |
59 // since the DNS address is only looked up after the connection is | |
60 // established, which results in unexpected event ordering. | |
61 base::TimeTicks dns_start; | |
62 base::TimeTicks dns_end; | |
63 | |
64 // The time spent establishing the connection started. Connect time includes | |
65 // proxy DNS lookup times, blocking, TCP, TCP retries and SSL time. | |
eroman
2012/12/14 04:08:35
Is this what webtiming expects too? (I could see h
mmenke
2012/12/14 13:36:12
The spec is unclear. I talked to one of the Navig
| |
66 base::TimeTicks connect_start; | |
67 base::TimeTicks connect_end; | |
68 | |
69 // The time when the SSL handshake started / completed. For non-HTTPS requests | |
70 // these are NULL. These times are only for the SSL connection to the final | |
71 // destination server, not an SSL/SPDY proxy. | |
72 base::TimeTicks ssl_start; | |
73 base::TimeTicks ssl_end; | |
74 | |
75 // The time that sending HTTP request started / ended. | |
76 base::TimeTicks send_start; | |
77 base::TimeTicks send_end; | |
78 | |
79 // The time at which the end of the HTTP headers were received. | |
80 base::TimeTicks receive_headers_end; | |
81 }; | |
82 | |
83 } // namespace net | |
84 | |
85 #endif // LOAD_TIMING_INFO_H_ | |
OLD | NEW |