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

Function main

scripts/analysis.ts:118–146  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

116}
117
118async function main(): Promise<void> {
119 const args = process.argv.slice(2);
120
121 if (args.length === 0) {
122 usage();
123 process.exit(1);
124 }
125
126 const filePath = args[0];
127 let runs: EvaluationRunExport[];
128
129 try {
130 const fileContent = readFileSync(filePath, "utf-8");
131 runs = JSON.parse(fileContent) as EvaluationRunExport[];
132 } catch (error) {
133 console.error(`Error reading file ${filePath}:`, error);
134 process.exit(1);
135 }
136
137 if (runs.length === 0) {
138 console.error("No evaluation runs found in the provided file.");
139 process.exit(1);
140 }
141
142 runs.sort((a, b) => b.finalScore - a.finalScore);
143
144 const output = await generateAnalysis(runs);
145 process.stdout.write(`${output.trimEnd()}\n`);
146}
147
148if (import.meta.main) {
149 main().catch((error) => {

Callers 1

analysis.tsFile · 0.70

Calls 2

generateAnalysisFunction · 0.85
usageFunction · 0.70

Tested by

no test coverage detected