(records []verifierComplexityRecord, metric func(r verifierComplexityRecord) int)
| 218 | } |
| 219 | |
| 220 | func calcMinMax(records []verifierComplexityRecord, metric func(r verifierComplexityRecord) int) map[string]minMax { |
| 221 | minMaxRecords := map[string]minMax{} |
| 222 | for _, r := range records { |
| 223 | mm, ok := minMaxRecords[collectionProgramKey(r)] |
| 224 | if !ok { |
| 225 | mm = minMax{ |
| 226 | min: metric(r), |
| 227 | minKey: kernelBuildLoadKey(r), |
| 228 | max: metric(r), |
| 229 | maxKey: kernelBuildLoadKey(r), |
| 230 | } |
| 231 | } |
| 232 | if metric(r) < mm.min { |
| 233 | mm.minKey = kernelBuildLoadKey(r) |
| 234 | mm.min = metric(r) |
| 235 | } |
| 236 | if metric(r) > mm.max { |
| 237 | mm.maxKey = kernelBuildLoadKey(r) |
| 238 | mm.max = metric(r) |
| 239 | } |
| 240 | minMaxRecords[collectionProgramKey(r)] = mm |
| 241 | } |
| 242 | |
| 243 | return minMaxRecords |
| 244 | } |
| 245 | |
| 246 | func minMaxKeysSortAbs(minMaxes map[string]minMax) []string { |
| 247 | keys := slices.Sorted(maps.Keys(minMaxes)) |
no test coverage detected
searching dependent graphs…