Search code examples
google-chrome-devtoolschrome-devtools-protocol

What does "requestTime" number mean in Chrome DevTools?


According Chrome DevTools Protocol viewer the value of requestTime is a baseline in seconds. To understand it I took this value from few web pages and for all of them the value of requestTime was unexpectedly large. For example one of them was 13133423 seconds. Does anyone know why the value of requestTime is too large? And what requestTime value mean?


Solution

  • Quoting the source code:

    We want to present a unified timeline to Javascript. Using walltime is problematic, because the clock may skew while resources load. To prevent that skew, we record a single reference walltime when root document navigation begins.

    All other times are recorded using monotonicallyIncreasingTime().

    When a time needs to be presented to Javascript, we build a pseudo-walltime using the following equation (m_requestTime as example): pseudo time = document wall reference + (m_requestTime - document monotonic reference)

    All values from monotonicallyIncreasingTime(), in base::TimeTicks.

    More info on monotonicallyIncreasingTime: https://stackoverflow.com/a/39634132