Package anbxj

Class Crypto_Event

java.lang.Object
jdk.internal.event.Event
jdk.jfr.Event
anbxj.Crypto_Event

public class Crypto_Event extends Event
A custom Java Flight Recorder (JFR) event that captures the execution time and context of a single cryptographic operation inside the AnBx library.

Instances of this event are created and committed by AnB_Crypto_Wrapper.flushJfr() when execution-time logging is enabled via AnB_Crypto_Wrapper.setLoggingExecTimeEnabled(boolean). Each event records:

  • the name of the timed method (e.g., "encrypt", "sign"),
  • the raw duration in nanoseconds,
  • an implementation-specific detail string (e.g., "AES/GCM/128"),
  • the protocol session ID (if set), and
  • the protocol step number (if set).

The event is registered under the JFR name anbxj.Crypto_Event and can be analysed in JDK Mission Control or any other JFR consumer to compute statistics such as mean duration, standard deviation, and percentiles per operation type, session, or step.

See Also:
  • Constructor Details

    • Crypto_Event

      public Crypto_Event(String method, long durationNanos, String details, long sessionId, int step)
      Creates a new event with the given method name, duration, detail, session ID, and step number.
      Parameters:
      method - the name of the cryptographic method (must not be null)
      durationNanos - the execution time in nanoseconds
      details - a compact description of the operation, or null
      sessionId - the protocol session ID, or -1 if not applicable
      step - the protocol step number, or -1 if not applicable