4

For a research project I am analyzing recordings made using Google Chrome's DevTools Timeline, meaning I run my own software over the saved .json files. I am having trouble understanding their timestamp variable though, and tools such as the EpochConverter do not help. A typical line would be:

{"pid":14038,"tid":17939,"ts":176780856024,"ph":"X","cat":"ipc,toplevel","name":"ChannelReader::DispatchInputData","args":{"class":60,"line":70},"dur":11,"tdur":2,"tts":90016,"bind_id":"0xb35f6002","flow_in":true}

Neither the ts- nor the tts-value provide anything that makes sense. This recording was made with Chrome on Mac. I would much appreciate any help, as for my research it is essential that I'm able to correlate times of scripts. Cheers!

1 Answers1

8

Empirically, ts is the time since OS boot in microseconds (millionths of a second), at least on *nix.

The size of the numbers suggested to me that ts was a fairly high-precision value. So I did a quick recording (roughly seven seconds) and compared the last ts value to the first; it was roughly seven million. Another quick recording confirmed it: Roughly three million for a roughly three-second recording.

Having established microseconds as the units, I wondered what it could be relative to. It clearly wasn't The Epoch. My first thought was "since browser start," but I quickly determined that wasn't the case. But when I looked at the initial number I got (which came out to about 72 hours), I thought "That sounds roughly like how long it's been since I rebooted." A quick reboot confirmed it.

I'm very surprised not to find this information in either of these pages:

T.J. Crowder
  • 1,031,962
  • 187
  • 1,923
  • 1,875
  • Cheers T.J., that seems right! It is very unfortunate that it isn't a clear reference in those links, especially since that restricts the use of timeline data to the DevTools. They offer the value "dur" but not every process is assigned this value. Thank you! – jesbengradev Jul 24 '16 at 12:59
  • 2
    FYI you might be interested in this documentation on the trace format https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/edit – Ishan Mar 28 '17 at 16:54
  • @Ishan: Great stuff! That confirms the microseconds units: *"**ts**: The tracing clock timestamp of the event. The timestamps are provided at microsecond granularity."* – T.J. Crowder Mar 28 '17 at 17:10
  • Oh man. I literally was just hunting for this information and (re)discovered my own comment. https://twitter.com/ianand/status/1395867460180484097 – Ishan May 21 '21 at 22:31