- java.lang.Object
-
- jdk.jfr.EventSettings
-
public abstract class EventSettings extends Object
Convenience class for applying event settings to a recording.An
EventSettings
object for a recording can be obtained by invoking theRecording.enable(String)
method which is configured using method chaining.The following example shows how to use the
EventSettings
class.Recording r = new Recording(); r.enable("jdk.CPULoad") .withPeriod(Duration.ofSeconds(1)); r.enable("jdk.FileWrite") .withoutStackTrace() .withThreshold(Duration.ofNanos(10)); r.start(); Thread.sleep(10_000); r.stop(); r.dump(Files.createTempFile("recording", ".jfr"));
- Since:
- 9
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract EventSettings
with(
-