Home / File/ ReactFlightPerformanceTrack.js — react Source File

ReactFlightPerformanceTrack.js — react Source File

Architecture documentation for ReactFlightPerformanceTrack.js, a javascript file in the react codebase. 4 imports, 1 dependents.

File javascript BabelCompiler Validation 4 imports 1 dependents 12 functions

Entity Profile

Dependency Diagram

graph LR
  e5244d6e_35d7_7c99_420d_82c7be8fe931["ReactFlightPerformanceTrack.js"]
  d8f20c67_f5fa_0f0a_c967_c41fd9ffce07["ReactTypes"]
  e5244d6e_35d7_7c99_420d_82c7be8fe931 --> d8f20c67_f5fa_0f0a_c967_c41fd9ffce07
  8344de1b_978c_be0f_eebd_38ccc4962a93["ReactFeatureFlags"]
  e5244d6e_35d7_7c99_420d_82c7be8fe931 --> 8344de1b_978c_be0f_eebd_38ccc4962a93
  8f26733a_6439_3385_e619_f96914b1e0f0["ReactPerformanceTrackProperties"]
  e5244d6e_35d7_7c99_420d_82c7be8fe931 --> 8f26733a_6439_3385_e619_f96914b1e0f0
  1e9faa26_a12f_b82b_c50b_26f16a72577f["ReactIODescription"]
  e5244d6e_35d7_7c99_420d_82c7be8fe931 --> 1e9faa26_a12f_b82b_c50b_26f16a72577f
  61eb841d_69e6_7047_22ce_b71bae029dcd["ReactFlightClient.js"]
  61eb841d_69e6_7047_22ce_b71bae029dcd --> e5244d6e_35d7_7c99_420d_82c7be8fe931
  style e5244d6e_35d7_7c99_420d_82c7be8fe931 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow
 */

/* eslint-disable react-internal/no-production-logging */

import type {
  ReactComponentInfo,
  ReactIOInfo,
  ReactAsyncInfo,
} from 'shared/ReactTypes';

import {enableProfilerTimer} from 'shared/ReactFeatureFlags';

import {
  addValueToProperties,
  addObjectToProperties,
} from 'shared/ReactPerformanceTrackProperties';

import {getIODescription} from 'shared/ReactIODescription';

const supportsUserTiming =
  enableProfilerTimer &&
  typeof console !== 'undefined' &&
  typeof console.timeStamp === 'function' &&
  typeof performance !== 'undefined' &&
  // $FlowFixMe[method-unbinding]
  typeof performance.measure === 'function';

const IO_TRACK = 'Server Requests ⚛';
const COMPONENTS_TRACK = 'Server Components ⚛';

export function markAllTracksInOrder() {
  if (supportsUserTiming) {
    // Ensure we create the Server Component track groups earlier than the Client Scheduler
    // and Client Components. We can always add the 0 time slot even if it's in the past.
    // That's still considered for ordering.
    console.timeStamp(
      'Server Requests Track',
      0.001,
      0.001,
      IO_TRACK,
      undefined,
      'primary-light',
    );
    console.timeStamp(
      'Server Components Track',
      0.001,
      0.001,
      'Primary',
      COMPONENTS_TRACK,
      'primary-light',
    );
  }
}
// ... (590 more lines)

Domain

Subdomains

Dependencies

  • ReactFeatureFlags
  • ReactIODescription
  • ReactPerformanceTrackProperties
  • ReactTypes

Frequently Asked Questions

What does ReactFlightPerformanceTrack.js do?
ReactFlightPerformanceTrack.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in ReactFlightPerformanceTrack.js?
ReactFlightPerformanceTrack.js defines 12 function(s): getIOLongName, getIOShortName, logComponentAborted, logComponentAwait, logComponentAwaitAborted, logComponentAwaitErrored, logComponentErrored, logComponentRender, logDedupedComponentRender, logIOInfo, and 2 more.
What does ReactFlightPerformanceTrack.js depend on?
ReactFlightPerformanceTrack.js imports 4 module(s): ReactFeatureFlags, ReactIODescription, ReactPerformanceTrackProperties, ReactTypes.
What files import ReactFlightPerformanceTrack.js?
ReactFlightPerformanceTrack.js is imported by 1 file(s): ReactFlightClient.js.
Where is ReactFlightPerformanceTrack.js in the architecture?
ReactFlightPerformanceTrack.js is located at packages/react-client/src/ReactFlightPerformanceTrack.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-client/src).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free