java.lang.Object
io.helidon.common.testing.virtualthreads.PinningRecorder
All Implemented Interfaces:
AutoCloseable

public class PinningRecorder extends Object implements AutoCloseable
Record pinned thread events and throw exception when detected.
  • Field Details

    • DEFAULT_THRESHOLD

      public static final long DEFAULT_THRESHOLD
      Default threshold for considering carrier thread blocking as pinning.
      See Also:
  • Method Details

    • create

      public static PinningRecorder create()
      Create new pinning JFR event recorder.
      Returns:
      new pinning recorder
    • record

      public void record(Duration threshold)
      Start async recording of jdk.VirtualThreadPinned JFR event.
      Parameters:
      threshold - time threshold for carrier thread blocking to be considered as pinning
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable