MCPcopy Create free account
hub / github.com/openai/plugins / buildStat

Function buildStat

plugins/plugin-eval/src/core/observed-usage.js:14–31  ·  view source on GitHub ↗
(values)

Source from the content-addressed store, hash-verified

12}
13
14function buildStat(values) {
15 if (values.length === 0) {
16 return {
17 total: 0,
18 average: 0,
19 min: 0,
20 max: 0,
21 };
22 }
23
24 const total = values.reduce((sum, value) => sum + value, 0);
25 return {
26 total,
27 average: round(total / values.length),
28 min: Math.min(...values),
29 max: Math.max(...values),
30 };
31}
32
33function classifyEstimateAlignment(deltaRatio) {
34 if (deltaRatio <= 0.2) {

Callers 1

analyzeObservedUsageFunction · 0.85

Calls 1

roundFunction · 0.85

Tested by

no test coverage detected