benchmarkCannon() — astro Function Reference
Architecture documentation for the benchmarkCannon() function in server-stress.js from the astro codebase.
Entity Profile
Dependency Diagram
graph TD cf992736_c919_558e_07d3_47d9dab7be64["benchmarkCannon()"] 84e8dcec_8779_ed84_459a_2c92f21c0f63["server-stress.js"] cf992736_c919_558e_07d3_47d9dab7be64 -->|defined in| 84e8dcec_8779_ed84_459a_2c92f21c0f63 b10e2763_a98a_e2fe_fbec_05e0586161fb["run()"] b10e2763_a98a_e2fe_fbec_05e0586161fb -->|calls| cf992736_c919_558e_07d3_47d9dab7be64 style cf992736_c919_558e_07d3_47d9dab7be64 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
benchmark/bench/server-stress.js lines 64–85
export async function benchmarkCannon() {
return new Promise((resolve, reject) => {
const instance = autocannon(
{
url: `http://localhost:${port}`,
connections: 100,
duration: 30,
pipelining: 10,
},
(err, result) => {
if (err) {
reject(err);
} else {
// @ts-expect-error untyped but documented
instance.stop();
resolve(result);
}
},
);
autocannon.track(instance, { renderResultsTable: false });
});
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does benchmarkCannon() do?
benchmarkCannon() is a function in the astro codebase, defined in benchmark/bench/server-stress.js.
Where is benchmarkCannon() defined?
benchmarkCannon() is defined in benchmark/bench/server-stress.js at line 64.
What calls benchmarkCannon()?
benchmarkCannon() is called by 1 function(s): run.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free