google / perfetto

Performance instrumentation and tracing for Android, Linux and Chrome (read-only mirror of https://android.googlesource.com/platform/external/perfetto/)
https://www.perfetto.dev
Apache License 2.0
2.81k stars 350 forks source link

Perfetto doesn't expose metadata from F12 Dev Tools .json file #595

Open ivberg opened 1 year ago

ivberg commented 1 year ago
  1. Capture a F12 Dev Tools trace with a Chromium browser and save - https://developer.chrome.com/docs/devtools/performance/reference/
  2. Open saved .json file and see metadata
    "metadata": {
    "source": "DevTools",
    "startTime": "2023-09-21T21:04:15.706Z",
    "cpuThrottling": 1,
    "networkThrottling": "No throttling",
    "hardwareConcurrency": 12
    }
  3. Open the .json in http://ui.perfetto.dev
  4. The metadata including trace startTime will not be available in the data anywhere including select * from metadata

This prevents correlating a trace with other diagnostics or data using an absolute time, even though the data is present in the source trace.

LalitMaganti commented 1 year ago

From our perspective, this is WAI. Our policy for the JSON trace format is defined in https://perfetto.dev/docs/faq#why-does-perfetto-not-support-lt-some-obscure-json-format-feature-gt- and we've never bothered to implement this because it was not critical to get Chrome JSON traces loaded in the Perfetto UI.

We'd happily accept contributions for this but this is not something we will get to ourselves.

ivberg commented 1 year ago

Thanks @LalitMaganti for explaining. We expected this response. Just documenting this issue for others and understand we would have to contribute to fix it.