(String path)
| 57 | } |
| 58 | |
| 59 | static Map<String, BenchmarkInfo> load(String path) { |
| 60 | File file = new File(path); |
| 61 | ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); |
| 62 | TypeReference<List<BenchmarkInfo>> typeRef = new TypeReference<>() {}; |
| 63 | try { |
| 64 | Map<String, BenchmarkInfo> benchmarkInfos = Maps.newLinkedHashMap(); |
| 65 | mapper.readValue(file, typeRef).forEach( |
| 66 | bmInfo -> benchmarkInfos.put(bmInfo.id(), bmInfo)); |
| 67 | return benchmarkInfos; |
| 68 | } catch (IOException e) { |
| 69 | throw new RuntimeException(e); |
| 70 | } |
| 71 | } |
| 72 | } |
no test coverage detected