profilingCache-test.js — react Source File
Architecture documentation for profilingCache-test.js, a javascript file in the react codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 7afb1112_0f51_a3ac_84d9_70f6fbfa4ca1["profilingCache-test.js"] 7ea1760e_9c01_71c9_3ba5_32a9a10a0ce4["utils.js"] 7afb1112_0f51_a3ac_84d9_70f6fbfa4ca1 --> 7ea1760e_9c01_71c9_3ba5_32a9a10a0ce4 4077b620_5c59_61c2_0910_273f565da757["bridge"] 7afb1112_0f51_a3ac_84d9_70f6fbfa4ca1 --> 4077b620_5c59_61c2_0910_273f565da757 baf70b0e_4867_b3ed_962a_e5c9ae820fef["store"] 7afb1112_0f51_a3ac_84d9_70f6fbfa4ca1 --> baf70b0e_4867_b3ed_962a_e5c9ae820fef style 7afb1112_0f51_a3ac_84d9_70f6fbfa4ca1 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 {FrontendBridge} from 'react-devtools-shared/src/bridge';
import type Store from 'react-devtools-shared/src/devtools/store';
import {getVersionedRenderImplementation} from './utils';
describe('ProfilingCache', () => {
let React;
let ReactDOM;
let ReactDOMClient;
let Scheduler;
let bridge: FrontendBridge;
let legacyRender;
let store: Store;
let utils;
beforeEach(() => {
utils = require('./utils');
utils.beforeEachProfiling();
legacyRender = utils.legacyRender;
bridge = global.bridge;
store = global.store;
store.collapseNodesByDefault = false;
store.recordChangeDescriptions = true;
React = require('react');
ReactDOM = require('react-dom');
ReactDOMClient = require('react-dom/client');
Scheduler = require('scheduler');
});
const {render, getContainer} = getVersionedRenderImplementation();
// @reactVersion >= 16.9
// @reactVersion <= 18.2
it('should collect data for each root (including ones added or mounted after profiling started) (legacy render)', () => {
const Parent = ({count}) => {
Scheduler.unstable_advanceTime(10);
const children = new Array(count)
.fill(true)
.map((_, index) => <Child key={index} duration={index} />);
return (
<React.Fragment>
{children}
<MemoizedChild duration={1} />
</React.Fragment>
);
};
const Child = ({duration}) => {
Scheduler.unstable_advanceTime(duration);
// ... (1373 more lines)
Domain
Dependencies
- bridge
- store
- utils.js
Source
Frequently Asked Questions
What does profilingCache-test.js do?
profilingCache-test.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain.
What does profilingCache-test.js depend on?
profilingCache-test.js imports 3 module(s): bridge, store, utils.js.
Where is profilingCache-test.js in the architecture?
profilingCache-test.js is located at packages/react-devtools-shared/src/__tests__/profilingCache-test.js (domain: BabelCompiler, directory: packages/react-devtools-shared/src/__tests__).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free