Given a 'trace.json' from Performance Tab, How can I get Insights and Summary in JSON?

11 views
Skip to first unread message

Jhon Paul Jaspe

unread,
May 13, 2025, 7:48:10 AMMay 13
to devtoo...@chromium.org
Hello devtools-dev,

I have a generated 'trace.json' report from Chrome's Performance Tab, and I love the details of the summary and network insights it provides. I'm creating a tool that would automate getting these insights for multiple pages on our site and generating reports for it. I'm wondering how I can get the Network Summary and Insights such as Network Dependency Tree in a JSON format?

I tried parsing the 'trace.json' file, and manually computing the times but I can't get the same results as displayed in the network summary. 

Any response would be greatly appreciated, Thank you!

Regards,
Jhon Paul Jaspe

Jack Franklin

unread,
May 13, 2025, 9:37:29 AMMay 13
to Jhon Paul Jaspe, devtoo...@chromium.org
Hey Jhon,

Thanks for reaching out and I'm glad you find the features helpful!

As of now there is no way to get the Insights as a JSON summary from DevTools. However, we do publish the trace engine that DevTools uses under the hood to npm: https://www.npmjs.com/package/@paulirish/trace_engine. If you wanted you could execute that and get at the data programmatically to generate your JSON.

One caveat: whilst the trace engine is published on npm, it is not intended for wide consumption and therefore we cannot guarantee we won't make breaking changes, etc, and you will find the docs pretty sparse. It is there for people willing to dive in and hack with it, not something that we will support as a formal open source project.

We are also rolling these Insights into Lighthouse (https://developer.chrome.com/blog/moving-lighthouse-to-insights?hl=en) and Lighthouse does expose the information in a JSON file; so another option for you could be looking into using LH programmatically.

Thanks,

Jack.

--
You received this message because you are subscribed to the Google Groups "devtools-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to devtools-dev...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/devtools-dev/CAGjfRHoo-SHBdbUgZLQDfOX8WYTU-%2BNhqAmD2qROvCQO3tX3Kw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages