diff_profiles
Compare two V8 CPU profiles to identify per-function CPU time changes after an optimization. Get normalized deltas showing which functions improved or regressed and by how much.
Instructions
Compares two V8 .cpuprofile files (before and after an optimization) and returns per-function CPU time deltas, normalized against each profile's total duration. Frames are matched by call-frame coordinates (functionName + url + line + column), not by transient node IDs, so alignment is stable across profiling sessions. Use to answer: which functions improved or regressed after my change, and by how much?
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top_n | No | Number of top improvements and regressions to return (default: 5) | |
| after_profile_path | Yes | Absolute path to the optimized .cpuprofile file to compare against the baseline | |
| before_profile_path | Yes | Absolute path to the baseline .cpuprofile file |