feat(react-devtools): drill into the saved React profile by component and commit

Merged
TH
6h ago
+420-18

Summary

Adds drill-down views over the profile that react-devtools profile stop (#3613) saves for the session:

agent-device react-devtools profile report ContactRow   # causes, changed props and their kinds, owners, costliest commits
agent-device react-devtools profile commit 6            # one commit's components, grouped, by self time
agent-device react-devtools profile slow --limit 5
agent-device react-devtools profile rerenders --limit 5
agent-device react-devtools profile timeline --limit 20 --sort duration

stop now ends with a More: line naming these commands. Tables say how many rows they omit. report takes a component name and commit takes a whole index (6 or #6). A malformed saved profile fails with a hint to record a new one. Touches 9 files (378 lines).

Validation

At 54120679f8, check:affected --run and check:production-exports pass.

Live on Android RN 0.88-rc, on this build, after the memo-defeated scenario: profile report ContactRow printed its causes, the changed prop kinds, and "its costliest commits (self time of commit duration): #0 136ms of 170ms, …".

On the RN 0.83 iOS simulator, profile report ProductTile printed both of its findings.