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

Function extractLatestUsage

plugins/plugin-eval/src/core/benchmark-events.js:57–63  ·  view source on GitHub ↗
(events)

Source from the content-addressed store, hash-verified

55}
56
57function extractLatestUsage(events) {
58 const matches = [];
59 for (const event of events) {
60 collectUsageCandidate(event, matches);
61 }
62 return matches.length > 0 ? matches[matches.length - 1] : null;
63}
64
65function collectErrorMessage(event) {
66 if (!event || typeof event !== "object") {

Callers 1

summarizeCodexEventsFunction · 0.85

Calls 1

collectUsageCandidateFunction · 0.85

Tested by

no test coverage detected