Skip to content

Commit

Permalink
Print which record failed to resolve in ipns publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
ianopolous committed Dec 22, 2023
1 parent d4c7aea commit d73911b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/org/peergos/IpnsPublisher.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ public static void main(String[] a) throws Exception {
+ " in " + (t1 - t0) / 1000 + "s";
System.out.println(total);
Files.write(resultsFile, total.getBytes(), StandardOpenOption.APPEND);
String fails = "\nFailed " + IntStream.range(0, recordCounts.size())
.filter(i -> recordCounts.get(i) == 0)
.mapToObj(i -> i)
.collect(Collectors.toList());
System.out.println(fails);
Files.write(resultsFile, fails.getBytes(), StandardOpenOption.APPEND);
}
} else {
keys = IntStream.range(0, keycount)
Expand Down

0 comments on commit d73911b

Please sign in to comment.