profilingHooks.js — react Source File
Architecture documentation for profilingHooks.js, a javascript file in the react codebase. 8 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR bd550dba_eac8_68ba_63f3_1127c8e84572["profilingHooks.js"] 2bbfa631_5780_6883_1746_b7c42df10b5d["DevToolsFiberComponentStack.js"] bd550dba_eac8_68ba_63f3_1127c8e84572 --> 2bbfa631_5780_6883_1746_b7c42df10b5d e40d98f8_c5d4_65cc_ca5e_14ef53f81450["describeFiber"] bd550dba_eac8_68ba_63f3_1127c8e84572 --> e40d98f8_c5d4_65cc_ca5e_14ef53f81450 40bf6909_04ae_bfb6_965f_14cfe98b94de["types"] bd550dba_eac8_68ba_63f3_1127c8e84572 --> 40bf6909_04ae_bfb6_965f_14cfe98b94de 42892443_e223_3da0_aeb9_e1b32a408fb0["ReactInternalTypes"] bd550dba_eac8_68ba_63f3_1127c8e84572 --> 42892443_e223_3da0_aeb9_e1b32a408fb0 d8f20c67_f5fa_0f0a_c967_c41fd9ffce07["ReactTypes"] bd550dba_eac8_68ba_63f3_1127c8e84572 --> d8f20c67_f5fa_0f0a_c967_c41fd9ffce07 68abd97e_17ac_d8a8_2d83_de72fc71c4a8["types"] bd550dba_eac8_68ba_63f3_1127c8e84572 --> 68abd97e_17ac_d8a8_2d83_de72fc71c4a8 af78c51d_c7cb_3bf4_550f_f3fcc48f4f34["isArray"] bd550dba_eac8_68ba_63f3_1127c8e84572 --> af78c51d_c7cb_3bf4_550f_f3fcc48f4f34 c3a23780_e9b5_6fce_b2fe_729ddfec1f40["constants"] bd550dba_eac8_68ba_63f3_1127c8e84572 --> c3a23780_e9b5_6fce_b2fe_729ddfec1f40 7dc1582f_e5c4_6fb0_e998_bd2982c8c801["renderer.js"] 7dc1582f_e5c4_6fb0_e998_bd2982c8c801 --> bd550dba_eac8_68ba_63f3_1127c8e84572 style bd550dba_eac8_68ba_63f3_1127c8e84572 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
*/
import type {
Lane,
Lanes,
DevToolsProfilingHooks,
WorkTagMap,
CurrentDispatcherRef,
} from 'react-devtools-shared/src/backend/types';
import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
import type {Wakeable} from 'shared/ReactTypes';
import type {
BatchUID,
InternalModuleSourceToRanges,
LaneToLabelMap,
ReactComponentMeasure,
ReactLane,
ReactMeasure,
ReactMeasureType,
ReactScheduleStateUpdateEvent,
SchedulingEvent,
SuspenseEvent,
TimelineData,
} from 'react-devtools-timeline/src/types';
import isArray from 'shared/isArray';
import {
REACT_TOTAL_NUM_LANES,
SCHEDULING_PROFILER_VERSION,
} from 'react-devtools-timeline/src/constants';
import {describeFiber} from './fiber/DevToolsFiberComponentStack';
// Add padding to the start/stop time of the profile.
// This makes the UI nicer to use.
const TIME_OFFSET = 10;
let performanceTarget: Performance | null = null;
// If performance exists and supports the subset of the User Timing API that we require.
let supportsUserTiming =
typeof performance !== 'undefined' &&
// $FlowFixMe[method-unbinding]
typeof performance.mark === 'function' &&
// $FlowFixMe[method-unbinding]
typeof performance.clearMarks === 'function';
let supportsUserTimingV3 = false;
if (supportsUserTiming) {
const CHECK_V3_MARK = '__v3';
const markOptions: {
detail?: mixed,
startTime?: number,
} = {};
// ... (930 more lines)
Domain
Subdomains
Dependencies
- DevToolsFiberComponentStack.js
- ReactInternalTypes
- ReactTypes
- constants
- describeFiber
- isArray
- types
- types
Source
Frequently Asked Questions
What does profilingHooks.js do?
profilingHooks.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 profilingHooks.js?
profilingHooks.js defines 5 function(s): GetTimelineData, boolean, getCurrentTime, number, setPerformanceMock_ONLY_FOR_TESTING.
What does profilingHooks.js depend on?
profilingHooks.js imports 8 module(s): DevToolsFiberComponentStack.js, ReactInternalTypes, ReactTypes, constants, describeFiber, isArray, types, types.
What files import profilingHooks.js?
profilingHooks.js is imported by 1 file(s): renderer.js.
Where is profilingHooks.js in the architecture?
profilingHooks.js is located at packages/react-devtools-shared/src/backend/profilingHooks.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-devtools-shared/src/backend).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free