MCPcopy Create free account
hub / github.com/docker/model-test / loadResultFile

Function loadResultFile

cmd/analyze-batch/main.go:303–315  ·  view source on GitHub ↗

loadResultFile loads test results from a JSON file

(filename string)

Source from the content-addressed store, hash-verified

301
302// loadResultFile loads test results from a JSON file
303func loadResultFile(filename string) ([]models.AgentTestResult, error) {
304 data, err := os.ReadFile(filename)
305 if err != nil {
306 return nil, err
307 }
308
309 var report models.AgentReport
310 if err := json.Unmarshal(data, &report); err != nil {
311 return nil, err
312 }
313
314 return report.Results, nil
315}
316
317// calculateToolInvocationMetrics calculates binary tool invocation metrics
318func calculateToolInvocationMetrics(results []models.AgentTestResult) MetricSet {

Callers 1

analyzeModelWithSourceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected