run() — astro Function Reference
Architecture documentation for the run() function in memory.js from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 42bdd164_e49f_c534_1484_3bf0799c8a9f["run()"] b65fc43f_6458_b0c9_e367_578ca2d1c391["memory.js"] 42bdd164_e49f_c534_1484_3bf0799c8a9f -->|defined in| b65fc43f_6458_b0c9_e367_578ca2d1c391 16468fb5_b9ec_692f_3fbd_07db538d05f7["printResult()"] 42bdd164_e49f_c534_1484_3bf0799c8a9f -->|calls| 16468fb5_b9ec_692f_3fbd_07db538d05f7 style 42bdd164_e49f_c534_1484_3bf0799c8a9f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
benchmark/bench/memory.js lines 16–41
export async function run(projectDir, outputFile) {
const root = fileURLToPath(projectDir);
const outputFilePath = fileURLToPath(outputFile);
console.log('Building and benchmarking...');
await exec('node', ['--expose-gc', '--max_old_space_size=10000', astroBin, 'build'], {
nodeOptions: {
cwd: root,
stdio: 'inherit',
env: {
ASTRO_TIMER_PATH: outputFilePath,
},
},
throwOnError: true,
});
console.log('Raw results written to', outputFilePath);
console.log('Result preview:');
console.log('='.repeat(10));
console.log(`#### Memory\n\n`);
console.log(printResult(JSON.parse(await fs.readFile(outputFilePath, 'utf-8'))));
console.log('='.repeat(10));
console.log('Done!');
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does run() do?
run() is a function in the astro codebase, defined in benchmark/bench/memory.js.
Where is run() defined?
run() is defined in benchmark/bench/memory.js at line 16.
What does run() call?
run() calls 1 function(s): printResult.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free