Class StartupObjectLoadTrace
java.lang.Object
io.github.protasm.jvmud.execution.instance.StartupObjectLoadTrace
- All Implemented Interfaces:
LPCObjectLoadObserver
Worker-side compilation and load diagnostics for a single mudlib startup.
-
Field Summary
Fields inherited from interface LPCObjectLoadObserver
NONE -
Constructor Summary
ConstructorsConstructorDescriptionStartupObjectLoadTrace(boolean enabled) Enables load tracing for one mudlib boot. -
Method Summary
Modifier and TypeMethodDescriptionvoidEnds startup-only tracing before player sessions begin.voidobjectCompileFailed(String objectId, Path sourcePath, Throwable failure) Called when a source compilation attempt fails with an exception.voidobjectCompileFinished(String objectId, Path sourcePath, boolean compiled, long elapsedNanos) Called after the runtime finishes a source compilation attempt.voidobjectCompileStarted(String objectId, Path sourcePath) Called before the runtime compiles a source file throughLPCRuntime.compile(Path).voidobjectLoadFailed(String objectId, Path sourcePath, int depth, Throwable failure) Called when a shared LPC object load fails with an exception.voidobjectLoadFinished(String objectId, Path sourcePath, int depth, boolean loaded, long elapsedNanos) Called after the runtime finishes a shared LPC object load attempt.voidobjectLoadStarted(String objectId, Path sourcePath, int depth) Called before the runtime starts loading a shared LPC object.voidWrites the summary only when detailed tracing was requested.summary()Summarizes distinct objects and attempts observed during startup.
-
Constructor Details
-
StartupObjectLoadTrace
public StartupObjectLoadTrace(boolean enabled) Enables load tracing for one mudlib boot.
-
-
Method Details
-
objectLoadStarted
Description copied from interface:LPCObjectLoadObserverCalled before the runtime starts loading a shared LPC object.- Specified by:
objectLoadStartedin interfaceLPCObjectLoadObserver- Parameters:
objectId- canonical mudlib object idsourcePath- resolved source pathdepth- current nested load depth
-
objectLoadFinished
public void objectLoadFinished(String objectId, Path sourcePath, int depth, boolean loaded, long elapsedNanos) Description copied from interface:LPCObjectLoadObserverCalled after the runtime finishes a shared LPC object load attempt.- Specified by:
objectLoadFinishedin interfaceLPCObjectLoadObserver- Parameters:
objectId- canonical mudlib object idsourcePath- resolved source pathdepth- nested load depth reported at startloaded- whether the object was loaded or supplied successfullyelapsedNanos- elapsed load time in nanoseconds
-
objectCompileFinished
public void objectCompileFinished(String objectId, Path sourcePath, boolean compiled, long elapsedNanos) Description copied from interface:LPCObjectLoadObserverCalled after the runtime finishes a source compilation attempt.- Specified by:
objectCompileFinishedin interfaceLPCObjectLoadObserver- Parameters:
objectId- canonical mudlib object idsourcePath- resolved source pathcompiled- whether compilation completed without reported problemselapsedNanos- elapsed compile time in nanoseconds
-
objectCompileStarted
Description copied from interface:LPCObjectLoadObserverCalled before the runtime compiles a source file throughLPCRuntime.compile(Path).- Specified by:
objectCompileStartedin interfaceLPCObjectLoadObserver- Parameters:
objectId- canonical mudlib object idsourcePath- resolved source path
-
objectLoadFailed
Description copied from interface:LPCObjectLoadObserverCalled when a shared LPC object load fails with an exception.- Specified by:
objectLoadFailedin interfaceLPCObjectLoadObserver- Parameters:
objectId- canonical mudlib object idsourcePath- resolved source pathdepth- nested load depth reported at startfailure- exception or error that prevented the load
-
objectCompileFailed
Description copied from interface:LPCObjectLoadObserverCalled when a source compilation attempt fails with an exception.- Specified by:
objectCompileFailedin interfaceLPCObjectLoadObserver- Parameters:
objectId- canonical mudlib object idsourcePath- resolved source pathfailure- exception or error that prevented compilation
-
finishStartup
public void finishStartup()Ends startup-only tracing before player sessions begin. -
summary
Summarizes distinct objects and attempts observed during startup. -
printSummaryIfEnabled
public void printSummaryIfEnabled()Writes the summary only when detailed tracing was requested.
-