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

Function findResultFiles

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

findResultFiles finds all agent test result files in the directory

(dir string)

Source from the content-addressed store, hash-verified

160
161// findResultFiles finds all agent test result files in the directory
162func findResultFiles(dir string) ([]string, error) {
163 var files []string
164 pattern := regexp.MustCompile(`.*_agent_test_results_.*\.json$`)
165
166 err := filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error {
167 if err != nil {
168 return err
169 }
170 if !d.IsDir() && pattern.MatchString(d.Name()) {
171 files = append(files, path)
172 }
173 return nil
174 })
175
176 return files, err
177}
178
179// groupFilesByModel groups result files by model name
180func groupFilesByModel(files []string) map[string][]string {

Callers 1

analyzeBatchesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected