Home / File/ profilingCharts-test.js — react Source File

profilingCharts-test.js — react Source File

Architecture documentation for profilingCharts-test.js, a javascript file in the react codebase. 2 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  200fc35f_5b49_edb8_afe8_e99e48a64224["profilingCharts-test.js"]
  7ea1760e_9c01_71c9_3ba5_32a9a10a0ce4["utils.js"]
  200fc35f_5b49_edb8_afe8_e99e48a64224 --> 7ea1760e_9c01_71c9_3ba5_32a9a10a0ce4
  baf70b0e_4867_b3ed_962a_e5c9ae820fef["store"]
  200fc35f_5b49_edb8_afe8_e99e48a64224 --> baf70b0e_4867_b3ed_962a_e5c9ae820fef
  style 200fc35f_5b49_edb8_afe8_e99e48a64224 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 Store from 'react-devtools-shared/src/devtools/store';

import {getVersionedRenderImplementation} from './utils';

describe('profiling charts', () => {
  let React;
  let Scheduler;
  let store: Store;
  let utils;

  beforeEach(() => {
    utils = require('./utils');
    utils.beforeEachProfiling();

    store = global.store;
    store.collapseNodesByDefault = false;
    store.recordChangeDescriptions = true;

    React = require('react');
    Scheduler = require('scheduler');
  });

  const {render} = getVersionedRenderImplementation();

  function getFlamegraphChartData(rootID, commitIndex) {
    const commitTree = store.profilerStore.profilingCache.getCommitTree({
      commitIndex,
      rootID,
    });
    const chartData = store.profilerStore.profilingCache.getFlamegraphChartData(
      {
        commitIndex,
        commitTree,
        rootID,
      },
    );
    return {commitTree, chartData};
  }

  function getRankedChartData(rootID, commitIndex) {
    const commitTree = store.profilerStore.profilingCache.getCommitTree({
      commitIndex,
      rootID,
    });
    const chartData = store.profilerStore.profilingCache.getRankedChartData({
      commitIndex,
      commitTree,
      rootID,
    });
    return {commitTree, chartData};
  }
// ... (402 more lines)

Domain

Dependencies

Frequently Asked Questions

What does profilingCharts-test.js do?
profilingCharts-test.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain.
What does profilingCharts-test.js depend on?
profilingCharts-test.js imports 2 module(s): store, utils.js.
Where is profilingCharts-test.js in the architecture?
profilingCharts-test.js is located at packages/react-devtools-shared/src/__tests__/profilingCharts-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