equal
deleted
inserted
replaced
23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
26 package jdk.jfr.api.consumer; |
26 package jdk.jfr.api.consumer; |
27 |
27 |
28 import java.nio.file.Files; |
|
29 import java.nio.file.Path; |
28 import java.nio.file.Path; |
30 import java.util.List; |
29 import java.util.List; |
31 |
30 |
32 import jdk.jfr.Event; |
31 import jdk.jfr.Event; |
33 import jdk.jfr.Recording; |
32 import jdk.jfr.Recording; |
34 import jdk.jfr.consumer.RecordedEvent; |
33 import jdk.jfr.consumer.RecordedEvent; |
35 import jdk.jfr.consumer.RecordedThread; |
34 import jdk.jfr.consumer.RecordedThread; |
36 import jdk.jfr.consumer.RecordingFile; |
35 import jdk.jfr.consumer.RecordingFile; |
37 import jdk.test.lib.Asserts; |
36 import jdk.test.lib.Asserts; |
|
37 import jdk.test.lib.Utils; |
38 |
38 |
39 /* |
39 /* |
40 * @test |
40 * @test |
41 * @summary Tests that the RecordedEvent.getThread() returns th expected info |
41 * @summary Tests that the RecordedEvent.getThread() returns th expected info |
42 * @key jfr |
42 * @key jfr |
97 Recording r = new Recording(); |
97 Recording r = new Recording(); |
98 r.start(); |
98 r.start(); |
99 TestEvent t = new TestEvent(); |
99 TestEvent t = new TestEvent(); |
100 t.commit(); |
100 t.commit(); |
101 r.stop(); |
101 r.stop(); |
102 Path path = Files.createTempFile("recording", ".jfr"); |
102 Path path = Utils.createTempFile("event-thread", ".jfr"); |
103 System.out.println("Created path: " + path); |
103 System.out.println("Created path: " + path); |
104 r.dump(path); |
104 r.dump(path); |
105 r.close(); |
105 r.close(); |
106 return path; |
106 return path; |
107 } |
107 } |