equal
deleted
inserted
replaced
49 CountDownLatch latch = new CountDownLatch(1); |
49 CountDownLatch latch = new CountDownLatch(1); |
50 try (Recording r = new Recording()) { |
50 try (Recording r = new Recording()) { |
51 // Enable JVM event, no write permission needed |
51 // Enable JVM event, no write permission needed |
52 r.enable(EventNames.JVMInformation); |
52 r.enable(EventNames.JVMInformation); |
53 r.start(); |
53 r.start(); |
|
54 try (Recording r2 = new Recording()){ |
|
55 r2.start(); |
|
56 r2.stop(); |
|
57 } |
54 r.stop(); |
58 r.stop(); |
55 try (EventStream es = EventStream.openRepository()) { |
59 try (EventStream es = EventStream.openRepository()) { |
56 es.setStartTime(Instant.EPOCH); |
60 es.setStartTime(Instant.EPOCH); |
57 es.onEvent("jdk.JVMInformation", e -> { |
61 es.onEvent("jdk.JVMInformation", e -> { |
58 latch.countDown(); |
62 latch.countDown(); |