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

Function sendEvents

perf/src/index.ts:56–81  ·  view source on GitHub ↗
(count: number)

Source from the content-addressed store, hash-verified

54}
55
56async function sendEvents(count: number) {
57 const events = new Array(count).fill({
58 name: "perf.test",
59 payload: {
60 string: "Hello, World!",
61 number: 42,
62 boolean: true,
63 nullValue: null,
64 array: [1, 2, 3],
65 object: {
66 nestedString: "Nested value",
67 nestedNumber: 3.14,
68 nestedArray: ["apple", "banana", "cherry"],
69 nestedObject: {
70 nestedBoolean: false,
71 nestedNull: null,
72 },
73 },
74 },
75 });
76 try {
77 return await Promise.all(clients.reverse().map((client) => client.sendEvents(events)));
78 } catch (err) {
79 console.error(err);
80 }
81}
82
83async function main() {
84 console.log("Preparing perf tests...");

Callers 2

mainParallelBulkFunction · 0.85
mainConcurrencyFunction · 0.85

Calls 3

errorMethod · 0.65
allMethod · 0.45
sendEventsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…