For example:
<img width="1904" alt="Screen Shot 2021-11-05 at 11 59 05 AM" src="https://user-images.githubusercontent.com/29597/140540816-25d6d47b-7aea-4121-aeaa-565accc65b1f.png">

if (state.currentReactComponentMeasure !== null) {
    console.error(
      'Component measure started while another measure in progress:',
      state.currentReactComponentMeasure,
    );
  }
}
function assertCurrentComponentMeasureType(
  state: ProcessorState,
  type: ReactComponentMeasureType,
): void {
  if (state.currentReactComponentMeasure === null) {
    console.error(
      `Component measure type "${type}" stopped while no measure was in progress`,
    );
  } else if (state.currentReactComponentMeasure.type !== type) {
    console.error(
      `Component measure type "${type}" stopped while type ${state.currentReactComponentMeasure.type} in progress`,
    );
  }
}
function processReactComponentMeasure(
  name: string,
  startTime: Milliseconds,
  currentProfilerData: ReactProfilerData,
  state: ProcessorState,
): void {
  if (name.startsWith('--component-render-start-')) {
    const [componentName] = name.substr(25).split('-');
    assertNoOverlappingComponentMeasure(state);