chrome-devtools-mcp icon indicating copy to clipboard operation
chrome-devtools-mcp copied to clipboard

feat: add performance_analyze_file tool

Open miyanaga opened this issue 4 weeks ago • 4 comments

This adds a new tool performance_analyze_file that lets you analyze trace files from the local filesystem.

Why

Currently, you can only analyze traces recorded live with performance_start_trace. But sometimes you already have trace files from Lighthouse, Chrome DevTools export, or other sources that you want to analyze.

What

  • Added performance_analyze_file tool that takes a file path and parses the trace
  • The analyzed trace is stored so you can use performance_analyze_insight to get details
  • Added tests for success, file not found, and invalid JSON cases

Testing

npm run test

All tests pass.

miyanaga avatar Dec 02 '25 11:12 miyanaga

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Dec 02 '25 11:12 google-cla[bot]

I have signed the CLA.

miyanaga avatar Dec 02 '25 12:12 miyanaga

cc @natorion

OrKoN avatar Dec 03 '25 06:12 OrKoN

I think this is useful as part of an automation.

I would suggest naming it performance_analyze_trace or something. Its a tracefile after all. I am not sure if we need it enabled/available per default though.

natorion avatar Dec 03 '25 12:12 natorion