(InputStream in)
| 38 | } |
| 39 | |
| 40 | public Map<String, Long> readMap(InputStream in) throws IOException { |
| 41 | Map<String, Long> map = new HashMap<>(); |
| 42 | |
| 43 | try (BufferedReader br = new BufferedReader(new InputStreamReader(in))) { |
| 44 | for (String line; (line = br.readLine()) != null; ) { |
| 45 | String[] kv = line.split(":", 2); |
| 46 | String key = kv[0].trim(); |
| 47 | String value = kv[1].trim(); |
| 48 | map.put(key, Long.parseLong(value)); |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | return map; |
| 53 | } |
| 54 | |
| 55 | public void benchmark() throws IOException { |
| 56 | while (true) { |