Skip to content

Commit

Permalink
merge thread dumps in one file
Browse files Browse the repository at this point in the history
  • Loading branch information
yusuke committed Sep 15, 2021
1 parent 0b28cb3 commit 7ac38ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gui/src/main/java/samurai/swing/LocalProcesses.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ public LocalProcessMenuItem(VM vm) {
this.vm = vm;
addActionListener(e -> {
try {
Path path = Paths.get(System.getProperty("user.home"),
String.format("%s-%d-%s.txt", vm.getFqcn(), vm.getPid(), LocalDateTime.now().format(dateTimeFormatter)));
for (int i = 0; i < 3; i++) {
Path path = Paths.get(System.getProperty("user.home"),
String.format("%s-%d-%s.txt", vm.getFqcn(), vm.getPid(), LocalDateTime.now().format(dateTimeFormatter)));
Files.write(path, ThreadDumpUtil.getThreadDump(vm.getPid()), StandardOpenOption.CREATE, StandardOpenOption.APPEND);
fileHistory.open(path.toFile());
Thread.sleep(1000);
Expand Down

0 comments on commit 7ac38ed

Please sign in to comment.