MCPcopy Create free account
hub / github.com/anomalyco/opencode-bench / buildAverageChartUrl

Function buildAverageChartUrl

scripts/discord-sample.ts:372–395  ·  view source on GitHub ↗
(
  evalName: string,
  models: ModelSummary[],
)

Source from the content-addressed store, hash-verified

370}
371
372function buildAverageChartUrl(
373 evalName: string,
374 models: ModelSummary[],
375): string | undefined {
376 if (models.length === 0) {
377 return undefined;
378 }
379
380 const sorted = models
381 .map((model) => ({
382 id: model.id,
383 score: Number(model.final.toFixed(3)),
384 }))
385 .sort((a, b) => b.score - a.score);
386
387 return buildBarChartUrl(
388 {
389 labels: sorted.map((entry) => entry.id),
390 values: sorted.map((entry) => entry.score),
391 title: `Average Performance by Model (${evalName})`,
392 },
393 { backgroundColor: "white" },
394 );
395}
396
397function buildOverallChartUrl(
398 evalSummaries: EvalSummary[],

Callers 1

buildPayloadsFunction · 0.85

Calls 1

buildBarChartUrlFunction · 0.85

Tested by

no test coverage detected