MCPcopy Create free account
hub / github.com/PrairieLearn/PrairieLearn / aggregate

Function aggregate

tools/load-test.js:126–135  ·  view source on GitHub ↗
(objs)

Source from the content-addressed store, hash-verified

124 * }
125 */
126function aggregate(objs) {
127 const ret = {};
128 for (let obj of objs) {
129 for (let key in obj) {
130 if (!(key in ret)) ret[key] = [];
131 ret[key] = ret[key].concat(obj[key]);
132 }
133 }
134 return ret;
135}
136
137async function sleep(sec) {
138 return new Promise(resolve => setTimeout(resolve, sec * 1000));

Callers 1

singleTestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected