The Rspack CLI supports the use of the RSPACK_PROFILE
environment variable for build performance profile.
This command will generate a .rspack-profile-${timestamp}
folder in the current folder, and it will contain logging.json
, trace.json
and jscpuprofile.json
files.
trace.json
: The time spent on each phase of the Rust side is recorded at a granular level using tracing and can be viewed using ui.perfetto.devjscpuprofile.json
: The time spent at each stage on the JavaScript side is recorded at a granular level using Node.js inspector and can be viewed using speedscope.applogging.json
: Includes some logging information that keeps a coarse-grained record of how long each phase of the build took