MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / main

Function main

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

Source from the content-addressed store, hash-verified

81}
82
83async function main() {
84 console.log("Preparing perf tests...");
85
86 // wait for 10 seconds
87 await new Promise((resolve) => setTimeout(resolve, 10000));
88
89 console.log("Starting perf tests in 1 second...");
90
91 // wait for 1 seconds
92 await new Promise((resolve) => setTimeout(resolve, 1000));
93
94 // Send 5 events per second for 30 seconds (1 event == 10 runs)
95 for (let i = 0; i < 30; i++) {
96 console.log("Sending 5 event...");
97
98 await sendEvent();
99 await sendEvent();
100 await sendEvent();
101 await sendEvent();
102 await sendEvent();
103
104 await new Promise((resolve) => setTimeout(resolve, 950));
105 }
106
107 // console.log("Sending 30 events...");
108 // for (let i = 0; i < 30; i++) {
109 // await sendEvent();
110 // }
111}
112
113async function mainParallel() {
114 const batches = 30;

Callers

nothing calls this directly

Calls 2

sendEventFunction · 0.85
logMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…