Class BaseEvent

java.lang.Object
io.quarkus.qute.trace.BaseEvent
Direct Known Subclasses:
ResolveEvent, TemplateEvent

public abstract class BaseEvent extends Object
Base class for trace events related to template rendering.

Captures the engine instance and tracks execution duration.

  • Constructor Details

    • BaseEvent

      public BaseEvent(Engine engine)
      Creates a new event and starts the timer.
      Parameters:
      engine - the engine managing the rendering process
  • Method Details

    • getEngine

      public Engine getEngine()
      Returns the engine managing the rendering process.
      Returns:
      the engine
    • done

      public void done()
      Marks the event as completed and records the end time.
    • getEllapsedTime

      public long getEllapsedTime()
      Returns the elapsed time in nanoseconds between the start and end of the event.

      If the event is not marked as done, returns -1.

      Returns:
      elapsed time in nanoseconds, or -1 if not finished