profiler icon indicating copy to clipboard operation
profiler copied to clipboard

Add network track support to the Chrome importer

Open acreskeyMoz opened this issue 11 months ago • 1 comments

It would be helpful if the Chrome importer mapped network requests to network tracks in the Firefox profiler.

For example, when loading the following Chrome Performance trace in the Chrome performance panel, we can see how Chrome scheduled and executed the network requests: Chrome-login.yahoo.com Trace-20250122T160410.json

Image

However when we import this into the Firefox profiler, the network requests appear to be dropped: https://share.firefox.dev/4h9GpsK

┆Issue is synchronized with this Jira Task

acreskeyMoz avatar Jan 23 '25 15:01 acreskeyMoz

That was indeed something I wanted to do, but couldn't get around to it.

I already have some notes on this, so let me put them here:

The network markers in the Chrome data is similar to ours, they are essentially a bunch of individual markers for some certain events, and they merge them together and generate synthetic network markers out of them. But the number of markers and the data is different than what we have.

This is the place in chromium where they generate these synthetic events: https://source.chromium.org/chromium/chromium/src/+/main:third_party/devtools-frontend/src/front_end/models/trace/handlers/NetworkRequestsHandler.ts;l=193-465;drc=2176b043b513af28108c91e30d38d0ed1f0dd777

Here are the individual events to see them easily: https://source.chromium.org/chromium/chromium/src/+/main:third_party/devtools-frontend/src/front_end/models/trace/handlers/NetworkRequestsHandler.ts;l=132-191;drc=2176b043b513af28108c91e30d38d0ed1f0dd777 and https://source.chromium.org/chromium/chromium/src/+/main:third_party/devtools-frontend/src/front_end/models/trace/types/TraceEvents.ts;l=2169-2209;drc=2176b043b513af28108c91e30d38d0ed1f0dd777 These are the event names that is used to create the network events:

  • ResourceChangePriority
  • ResourceWillSendRequest (could be more than one)
  • ResourceSendRequest (could be more than one)
  • ResourceReceiveResponse
  • ResourceReceivedData (could be more than one)
  • ResourceFinish
  • ResourceMarkAsCached

canova avatar Feb 05 '25 21:02 canova