rushstack icon indicating copy to clipboard operation
rushstack copied to clipboard

[rush] Add "--trace" flag to generate high-level build trace in Chrome Trace Events format

Open dmichon-msft opened this issue 4 years ago • 2 comments
trafficstars

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): image

How it was tested

Ran it locally against rushstack and against other private repos.

dmichon-msft avatar Mar 25 '21 00:03 dmichon-msft

Can we apply this to Heft? That might be even more interesting.

octogonz avatar Mar 26 '21 19:03 octogonz

@octogonz - #2574

dmichon-msft avatar Mar 27 '21 00:03 dmichon-msft