Class DefaultProfiler

java.lang.Object
com.helix.core.DefaultProfiler
All Implemented Interfaces:
Profiler

public class DefaultProfiler extends Object implements Profiler
Default implementation of Profiler tracking engine telemetry events.
  • Constructor Details

    • DefaultProfiler

      public DefaultProfiler()
  • Method Details

    • start

      public void start()
      Description copied from interface: Profiler
      Starts the profiler.
      Specified by:
      start in interface Profiler
    • stop

      public void stop()
      Description copied from interface: Profiler
      Stops the profiler.
      Specified by:
      stop in interface Profiler
    • isRunning

      public boolean isRunning()
      Description copied from interface: Profiler
      Checks if the profiler is currently active.
      Specified by:
      isRunning in interface Profiler
      Returns:
      true if running, false otherwise
    • addListener

      public void addListener(ProfileEventListener listener)
      Description copied from interface: Profiler
      Adds an event listener to receive profiling events.
      Specified by:
      addListener in interface Profiler
      Parameters:
      listener - listener to register
    • removeListener

      public void removeListener(ProfileEventListener listener)
      Description copied from interface: Profiler
      Removes an event listener.
      Specified by:
      removeListener in interface Profiler
      Parameters:
      listener - listener to unregister
    • recordEvent

      public void recordEvent(ProfileEvent event)
      Description copied from interface: Profiler
      Records a profile event manually or programmatically.
      Specified by:
      recordEvent in interface Profiler
      Parameters:
      event - the event to record
    • getRecordedEvents

      public List<ProfileEvent> getRecordedEvents()
      Description copied from interface: Profiler
      Retrieves all recorded events up to this point.
      Specified by:
      getRecordedEvents in interface Profiler
      Returns:
      snapshot list of recorded events
    • clear

      public void clear()
      Description copied from interface: Profiler
      Clears all recorded event history.
      Specified by:
      clear in interface Profiler