Home / Function/ setPerformanceMock_ONLY_FOR_TESTING() — react Function Reference

setPerformanceMock_ONLY_FOR_TESTING() — react Function Reference

Architecture documentation for the setPerformanceMock_ONLY_FOR_TESTING() function in profilingHooks.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  40d81e75_dae4_7b2e_2446_126450cf9646["setPerformanceMock_ONLY_FOR_TESTING()"]
  bd550dba_eac8_68ba_63f3_1127c8e84572["profilingHooks.js"]
  40d81e75_dae4_7b2e_2446_126450cf9646 -->|defined in| bd550dba_eac8_68ba_63f3_1127c8e84572
  style 40d81e75_dae4_7b2e_2446_126450cf9646 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-shared/src/backend/profilingHooks.js lines 91–97

export function setPerformanceMock_ONLY_FOR_TESTING(
  performanceMock: Performance | null,
) {
  performanceTarget = performanceMock;
  supportsUserTiming = performanceMock !== null;
  supportsUserTimingV3 = performanceMock !== null;
}

Domain

Subdomains

Frequently Asked Questions

What does setPerformanceMock_ONLY_FOR_TESTING() do?
setPerformanceMock_ONLY_FOR_TESTING() is a function in the react codebase, defined in packages/react-devtools-shared/src/backend/profilingHooks.js.
Where is setPerformanceMock_ONLY_FOR_TESTING() defined?
setPerformanceMock_ONLY_FOR_TESTING() is defined in packages/react-devtools-shared/src/backend/profilingHooks.js at line 91.

Analyze Your Own Codebase

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

Try Supermodel Free