()
| 64 | } |
| 65 | |
| 66 | async 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 | |
| 77 | function generateRandomString(length = 1024) { |
| 78 | // Choose your desired character set |
nothing calls this directly
no test coverage detected