MCPcopy Index your code
hub / github.com/googleworkspace/apps-script-samples / benchmark

Function benchmark

wasm/hello-world/src/test.js:66–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64}
65
66async function benchmark() {
67 await hello_("world"); // Warmup
68
69 console.log(await latency(hello_, 100, () => [generateRandomString(10)]));
70 console.log(await latency(hello_, 100, () => [generateRandomString(100)]));
71 console.log(await latency(hello_, 100, () => [generateRandomString(1000)]));
72 console.log(await latency(hello_, 100, () => [generateRandomString(10000)]));
73 console.log(await latency(hello_, 100, () => [generateRandomString(100000)]));
74 console.log(await latency(hello_, 30, () => [generateRandomString(1000000)]));
75}
76
77function generateRandomString(length = 1024) {
78 // Choose your desired character set

Callers

nothing calls this directly

Calls 3

hello_Function · 0.85
latencyFunction · 0.70
generateRandomStringFunction · 0.70

Tested by

no test coverage detected