Package com.helix.core
Class DefaultProfiler
java.lang.Object
com.helix.core.DefaultProfiler
- All Implemented Interfaces:
Profiler
Default implementation of
Profiler tracking engine telemetry events.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(ProfileEventListener listener) Adds an event listener to receive profiling events.voidclear()Clears all recorded event history.Retrieves all recorded events up to this point.booleanChecks if the profiler is currently active.voidrecordEvent(ProfileEvent event) Records a profile event manually or programmatically.voidremoveListener(ProfileEventListener listener) Removes an event listener.voidstart()Starts the profiler.voidstop()Stops the profiler.
-
Constructor Details
-
DefaultProfiler
public DefaultProfiler()
-
-
Method Details
-
start
public void start()Description copied from interface:ProfilerStarts the profiler. -
stop
public void stop()Description copied from interface:ProfilerStops the profiler. -
isRunning
public boolean isRunning()Description copied from interface:ProfilerChecks if the profiler is currently active. -
addListener
Description copied from interface:ProfilerAdds an event listener to receive profiling events.- Specified by:
addListenerin interfaceProfiler- Parameters:
listener- listener to register
-
removeListener
Description copied from interface:ProfilerRemoves an event listener.- Specified by:
removeListenerin interfaceProfiler- Parameters:
listener- listener to unregister
-
recordEvent
Description copied from interface:ProfilerRecords a profile event manually or programmatically.- Specified by:
recordEventin interfaceProfiler- Parameters:
event- the event to record
-
getRecordedEvents
Description copied from interface:ProfilerRetrieves all recorded events up to this point.- Specified by:
getRecordedEventsin interfaceProfiler- Returns:
- snapshot list of recorded events
-
clear
public void clear()Description copied from interface:ProfilerClears all recorded event history.
-