rushstack
rushstack copied to clipboard
[rush] Add "--trace" flag to generate high-level build trace in Chrome Trace Events format
Summary
Adds a --trace flag, which generates a trace of when each project was built and how long they took, in a format easily visualized using the about:tracing page in Chrome/Chromium/Edge or the Dev Tools in the same.
Details
Logs a "complete" event (start + end) for each task, and marks which builder "thread" they ran on. The latter is mostly for ease of viewing the concurrency.
Required some re-architecture of TaskRunner to have builder "threads" for tracking purposes. Also renders the status of individual tasks as a composite perf counter.
Example visualization here (build was completely from cache in this run):

How it was tested
Ran it locally against rushstack and against other private repos.
Can we apply this to Heft? That might be even more interesting.
@octogonz - #2574