()
| 134 | } |
| 135 | |
| 136 | async function mainParallelBulk() { |
| 137 | const batches = 1; |
| 138 | const concurrency = 10; |
| 139 | const eventsPer = 10; |
| 140 | |
| 141 | console.log("Preparing perf tests..."); |
| 142 | |
| 143 | // wait for 10 seconds |
| 144 | await new Promise((resolve) => setTimeout(resolve, 5000)); |
| 145 | |
| 146 | console.log("Starting perf tests in 1 second..."); |
| 147 | |
| 148 | // wait for 1 seconds |
| 149 | await new Promise((resolve) => setTimeout(resolve, 1000)); |
| 150 | |
| 151 | // Send 5 events per second for 30 seconds (1 event == 10 runs) |
| 152 | for (let i = 0; i < batches; i++) { |
| 153 | console.log(`Sending ${concurrency} x ${eventsPer} events... batch ${i + 1}/${batches}`); |
| 154 | await Promise.all(new Array(concurrency).fill(0).map(() => sendEvents(eventsPer))); |
| 155 | |
| 156 | await new Promise((resolve) => setTimeout(resolve, 250)); |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | async function mainLong() { |
| 161 | console.log("Preparing long perf tests..."); |
nothing calls this directly
no test coverage detected
searching dependent graphs…