MCPcopy Index your code
hub / github.com/react/react / logCommitPhase

Function logCommitPhase

packages/react-reconciler/src/ReactFiberPerformanceTrack.js:1441–1482  ·  view source on GitHub ↗
(
  startTime: number,
  endTime: number,
  errors: null | Array<CapturedValue<mixed>>,
  abortedViewTransition: boolean,
  debugTask: null | ConsoleTask,
)

Source from the content-addressed store, hash-verified

1439}
1440
1441export function logCommitPhase(
1442 startTime: number,
1443 endTime: number,
1444 errors: null | Array<CapturedValue<mixed>>,
1445 abortedViewTransition: boolean,
1446 debugTask: null | ConsoleTask,
1447): void {
1448 if (errors !== null) {
1449 logCommitErrored(startTime, endTime, errors, false, debugTask);
1450 return;
1451 }
1452 if (supportsUserTiming) {
1453 if (endTime <= startTime) {
1454 return;
1455 }
1456 if (__DEV__ && debugTask) {
1457 debugTask.run(
1458 // $FlowFixMe[method-unbinding]
1459 console.timeStamp.bind(
1460 console,
1461 abortedViewTransition
1462 ? 'Commit Interrupted View Transition'
1463 : 'Commit',
1464 startTime,
1465 endTime,
1466 currentTrack,
1467 LANES_TRACK_GROUP,
1468 abortedViewTransition ? 'error' : 'secondary-dark',
1469 ),
1470 );
1471 } else {
1472 console.timeStamp(
1473 abortedViewTransition ? 'Commit Interrupted View Transition' : 'Commit',
1474 startTime,
1475 endTime,
1476 currentTrack,
1477 LANES_TRACK_GROUP,
1478 abortedViewTransition ? 'error' : 'secondary-dark',
1479 );
1480 }
1481 }
1482}
1483
1484export function logPaintYieldPhase(
1485 startTime: number,

Callers 2

suspendedViewTransitionFunction · 0.90
flushLayoutEffectsFunction · 0.90

Calls 2

logCommitErroredFunction · 0.85
runMethod · 0.80

Tested by

no test coverage detected