MCPcopy
hub / github.com/triggerdotdev/trigger.dev / mainParallelBulk

Function mainParallelBulk

perf/src/index.ts:136–158  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

134}
135
136async 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
160async function mainLong() {
161 console.log("Preparing long perf tests...");

Callers

nothing calls this directly

Calls 3

sendEventsFunction · 0.85
logMethod · 0.65
allMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…