MCPcopy Create free account
hub / github.com/LFYSec/MScan / load

Method load

src/test/java/pascal/taie/analysis/pta/BenchmarkInfo.java:59–71  ·  view source on GitHub ↗
(String path)

Source from the content-addressed store, hash-verified

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}

Callers 1

BenchmarkRunnerClass · 0.95

Calls 4

newLinkedHashMapMethod · 0.95
forEachMethod · 0.65
putMethod · 0.65
idMethod · 0.45

Tested by

no test coverage detected