runScenario() — react Function Reference
Architecture documentation for the runScenario() function in benchmark.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD b2ef7c01_5c28_5871_b515_bf5c84d1478e["runScenario()"] 02d6bf58_0cc1_3948_88dc_770b7cc0c6a8["benchmark.js"] b2ef7c01_5c28_5871_b515_bf5c84d1478e -->|defined in| 02d6bf58_0cc1_3948_88dc_770b7cc0c6a8 ead87b1e_84cc_2be8_7c09_282b767b1113["runBenchmark()"] ead87b1e_84cc_2be8_7c09_282b767b1113 -->|calls| b2ef7c01_5c28_5871_b515_bf5c84d1478e style b2ef7c01_5c28_5871_b515_bf5c84d1478e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
scripts/bench/benchmark.js lines 17–41
async function runScenario(benchmark, chrome) {
const port = chrome.port;
const results = await Lighthouse(
`http://localhost:8080/${benchmark}/`,
{
output: 'json',
port,
},
config
);
const perfMarkings = results.lhr.audits['user-timings'].details.items;
const entries = perfMarkings
.filter(({timingType}) => timingType !== 'Mark')
.map(({duration, name}) => ({
entry: name,
time: duration,
}));
entries.push({
entry: 'First Meaningful Paint',
time: results.lhr.audits['first-meaningful-paint'].rawValue,
});
return entries;
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does runScenario() do?
runScenario() is a function in the react codebase, defined in scripts/bench/benchmark.js.
Where is runScenario() defined?
runScenario() is defined in scripts/bench/benchmark.js at line 17.
What calls runScenario()?
runScenario() 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