Allow users to add largestContentfulPaint as the last marker in markers configuration. In this case, we end trace on the largest-contentful-paint event. See detail in this RFC.
If the record-har command 's --marker=largestContentfulPaint, we end recording at the first largestContentfulPaint candidate.
Removed artificial generating paint event (enforcePaintEventFn) when injecting mark observer.
Remove performance.mark('traceEnd') within performanceObserver callback. Because the trace event doesn't get flushed.
Expose a few utility cli APIs.
Test Done
yarn test at the root level
Validated the trace end conditions are going through the correct flow using the debugger.
Validated the report has correct phase data when end trace at LCP
Summary
Test Done