MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / normalizeRunPluginOrder

Function normalizeRunPluginOrder

benchmark/core.go:403–423  ·  view source on GitHub ↗
(results map[string]PluginRunResult, order []string)

Source from the content-addressed store, hash-verified

401}
402
403func normalizeRunPluginOrder(results map[string]PluginRunResult, order []string) []string {
404 seen := map[string]struct{}{}
405 names := make([]string, 0, len(results))
406 for _, name := range order {
407 if _, ok := results[name]; !ok {
408 continue
409 }
410 if _, ok := seen[name]; ok {
411 continue
412 }
413 seen[name] = struct{}{}
414 names = append(names, name)
415 }
416 for _, name := range sortedRunPluginNames(results) {
417 if _, ok := seen[name]; ok {
418 continue
419 }
420 names = append(names, name)
421 }
422 return names
423}
424
425func sortedMetricNames(metrics map[string]any) []string {
426 names := make([]string, 0, len(metrics))

Callers 2

BuildRunWithOrderMethod · 0.85
runPluginNamesFunction · 0.85

Calls 1

sortedRunPluginNamesFunction · 0.85

Tested by

no test coverage detected