run() — astro Function Reference
Architecture documentation for the run() function in cli-startup.js from the astro codebase.
Entity Profile
Dependency Diagram
graph TD ef4d7e54_ae69_2f6b_edc8_8cd7f39da8e4["run()"] 4f5ebd66_3fdf_8047_4c83_d856ee583eeb["cli-startup.js"] ef4d7e54_ae69_2f6b_edc8_8cd7f39da8e4 -->|defined in| 4f5ebd66_3fdf_8047_4c83_d856ee583eeb 18a2b2ae_4c68_5978_d2cd_e2a17cf7702e["benchmarkCommand()"] ef4d7e54_ae69_2f6b_edc8_8cd7f39da8e4 -->|calls| 18a2b2ae_4c68_5978_d2cd_e2a17cf7702e 9201fa46_0fa8_5f5f_f6b4_91497e84705a["printResult()"] ef4d7e54_ae69_2f6b_edc8_8cd7f39da8e4 -->|calls| 9201fa46_0fa8_5f5f_f6b4_91497e84705a style ef4d7e54_ae69_2f6b_edc8_8cd7f39da8e4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
benchmark/bench/cli-startup.js lines 12–33
export async function run(projectDir) {
const root = fileURLToPath(projectDir);
console.log('Benchmarking `astro --help`...');
const helpStat = await benchmarkCommand('node', [astroBin, '--help'], root);
console.log('Done');
console.log('Benchmarking `astro preferences list`...');
const infoStat = await benchmarkCommand('node', [astroBin, 'preferences', 'list'], root);
console.log('Done');
console.log('Result preview:');
console.log('='.repeat(10));
console.log(`#### CLI Startup\n\n`);
console.log(
printResult({
'astro --help': helpStat,
'astro info': infoStat,
}),
);
console.log('='.repeat(10));
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does run() do?
run() is a function in the astro codebase, defined in benchmark/bench/cli-startup.js.
Where is run() defined?
run() is defined in benchmark/bench/cli-startup.js at line 12.
What does run() call?
run() calls 2 function(s): benchmarkCommand, printResult.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free