Home / Function/ initChrome() — react Function Reference

initChrome() — react Function Reference

Architecture documentation for the initChrome() function in benchmark.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  67400678_2818_e2b3_d58e_cb381173bbd1["initChrome()"]
  02d6bf58_0cc1_3948_88dc_770b7cc0c6a8["benchmark.js"]
  67400678_2818_e2b3_d58e_cb381173bbd1 -->|defined in| 02d6bf58_0cc1_3948_88dc_770b7cc0c6a8
  ead87b1e_84cc_2be8_7c09_282b767b1113["runBenchmark()"]
  ead87b1e_84cc_2be8_7c09_282b767b1113 -->|calls| 67400678_2818_e2b3_d58e_cb381173bbd1
  f715a20f_d40c_ceda_253e_ac080ce3e616["wait()"]
  67400678_2818_e2b3_d58e_cb381173bbd1 -->|calls| f715a20f_d40c_ceda_253e_ac080ce3e616
  style 67400678_2818_e2b3_d58e_cb381173bbd1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

scripts/bench/benchmark.js lines 87–99

async function initChrome() {
  const platform = os.platform();

  if (platform === 'linux') {
    process.env.XVFBARGS = '-screen 0, 1024x768x16';
    process.env.LIGHTHOUSE_CHROMIUM_PATH = 'chromium-browser';
    const child = spawn('xvfb start', [{detached: true, stdio: ['ignore']}]);
    child.unref();
    // wait for chrome to load then continue
    await wait(3000);
    return child;
  }
}

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does initChrome() do?
initChrome() is a function in the react codebase, defined in scripts/bench/benchmark.js.
Where is initChrome() defined?
initChrome() is defined in scripts/bench/benchmark.js at line 87.
What does initChrome() call?
initChrome() calls 1 function(s): wait.
What calls initChrome()?
initChrome() is called by 1 function(s): runBenchmark.

Analyze Your Own Codebase

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

Try Supermodel Free