beforeEachProfiling() — react Function Reference
Architecture documentation for the beforeEachProfiling() function in utils.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 3f355904_85f9_aa23_9622_d30b71c7e5b9["beforeEachProfiling()"] 7ea1760e_9c01_71c9_3ba5_32a9a10a0ce4["utils.js"] 3f355904_85f9_aa23_9622_d30b71c7e5b9 -->|defined in| 7ea1760e_9c01_71c9_3ba5_32a9a10a0ce4 style 3f355904_85f9_aa23_9622_d30b71c7e5b9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-devtools-shared/src/__tests__/utils.js lines 246–257
export function beforeEachProfiling(): void {
// Mock React's timing information so that test runs are predictable.
jest.mock('scheduler', () => jest.requireActual('scheduler/unstable_mock'));
// DevTools itself uses performance.now() to offset commit times
// so they appear relative to when profiling was started in the UI.
jest
.spyOn(performance, 'now')
.mockImplementation(
jest.requireActual('scheduler/unstable_mock').unstable_now,
);
}
Domain
Subdomains
Source
Frequently Asked Questions
What does beforeEachProfiling() do?
beforeEachProfiling() is a function in the react codebase, defined in packages/react-devtools-shared/src/__tests__/utils.js.
Where is beforeEachProfiling() defined?
beforeEachProfiling() is defined in packages/react-devtools-shared/src/__tests__/utils.js at line 246.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free