MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / summarize

Function summarize

scripts/bench/agent-control-benchmark.mjs:1201–1216  ·  view source on GitHub ↗
(samples)

Source from the content-addressed store, hash-verified

1199}
1200
1201function summarize(samples) {
1202 if (!samples.length) {
1203 return null;
1204 }
1205 const sorted = samples.slice().sort((a, b) => a - b);
1206 const middle = Math.floor(sorted.length / 2);
1207 const median =
1208 sorted.length % 2 === 0
1209 ? (sorted[middle - 1] + sorted[middle]) / 2
1210 : sorted[middle];
1211 return {
1212 min: sorted[0],
1213 max: sorted[sorted.length - 1],
1214 median,
1215 };
1216}
1217
1218function compareGroups(left, right) {
1219 const toolOrder = ["simdeck", "agent-device", "argent"];

Callers 1

buildReportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected