OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 double sslStart() const { return m_sslStart; } | 74 double sslStart() const { return m_sslStart; } |
75 double sslEnd() const { return m_sslEnd; } | 75 double sslEnd() const { return m_sslEnd; } |
76 double pushStart() const { return m_pushStart; } | 76 double pushStart() const { return m_pushStart; } |
77 double pushEnd() const { return m_pushEnd; } | 77 double pushEnd() const { return m_pushEnd; } |
78 | 78 |
79 double calculateMillisecondDelta(double) const; | 79 double calculateMillisecondDelta(double) const; |
80 | 80 |
81 private: | 81 private: |
82 ResourceLoadTiming(); | 82 ResourceLoadTiming(); |
83 | 83 |
84 // We want to present a unified timeline to Javascript. Using walltime is prob
lematic, because the clock may skew while resources | 84 // We want to present a unified timeline to Javascript. Using walltime is |
85 // load. To prevent that skew, we record a single reference walltime when root
document navigation begins. All other times are | 85 // problematic, because the clock may skew while resources load. To prevent |
86 // recorded using monotonicallyIncreasingTime(). When a time needs to be prese
nted to Javascript, we build a pseudo-walltime | 86 // that skew, we record a single reference walltime when root document |
87 // using the following equation (m_requestTime as example): | 87 // navigation begins. All other times are recorded using |
88 // pseudo time = document wall reference + (m_requestTime - document monoton
ic reference). | 88 // monotonicallyIncreasingTime(). When a time needs to be presented to |
| 89 // Javascript, we build a pseudo-walltime using the following equation |
| 90 // (m_requestTime as example): |
| 91 // pseudo time = document wall reference + |
| 92 // (m_requestTime - document monotonic reference). |
89 | 93 |
90 // All monotonicallyIncreasingTime() in seconds | 94 // All monotonicallyIncreasingTime() in seconds |
91 double m_requestTime; | 95 double m_requestTime; |
92 double m_proxyStart; | 96 double m_proxyStart; |
93 double m_proxyEnd; | 97 double m_proxyEnd; |
94 double m_dnsStart; | 98 double m_dnsStart; |
95 double m_dnsEnd; | 99 double m_dnsEnd; |
96 double m_connectStart; | 100 double m_connectStart; |
97 double m_connectEnd; | 101 double m_connectEnd; |
98 double m_workerStart; | 102 double m_workerStart; |
99 double m_workerReady; | 103 double m_workerReady; |
100 double m_sendStart; | 104 double m_sendStart; |
101 double m_sendEnd; | 105 double m_sendEnd; |
102 double m_receiveHeadersEnd; | 106 double m_receiveHeadersEnd; |
103 double m_sslStart; | 107 double m_sslStart; |
104 double m_sslEnd; | 108 double m_sslEnd; |
105 double m_pushStart; | 109 double m_pushStart; |
106 double m_pushEnd; | 110 double m_pushEnd; |
107 }; | 111 }; |
108 | 112 |
109 } // namespace blink | 113 } // namespace blink |
110 | 114 |
111 #endif | 115 #endif |
OLD | NEW |