Class PinningRecorder
java.lang.Object
io.helidon.common.testing.virtualthreads.PinningRecorder
- All Implemented Interfaces:
AutoCloseable
Record pinned thread events and throw exception when detected.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
Default threshold for considering carrier thread blocking as pinning. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
static PinningRecorder
create()
Create new pinning JFR event recorder.void
Start async recording ofjdk.VirtualThreadPinned
JFR event.
-
Field Details
-
DEFAULT_THRESHOLD
public static final long DEFAULT_THRESHOLDDefault threshold for considering carrier thread blocking as pinning.- See Also:
-
-
Method Details
-
create
Create new pinning JFR event recorder.- Returns:
- new pinning recorder
-
record
Start async recording ofjdk.VirtualThreadPinned
JFR event.- Parameters:
threshold
- time threshold for carrier thread blocking to be considered as pinning
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-