Class StartupObjectLoadTrace

java.lang.Object
io.github.protasm.jvmud.execution.instance.StartupObjectLoadTrace
All Implemented Interfaces:
LPCObjectLoadObserver

public final class StartupObjectLoadTrace extends Object implements LPCObjectLoadObserver
Worker-side compilation and load diagnostics for a single mudlib startup.
  • Constructor Details

    • StartupObjectLoadTrace

      public StartupObjectLoadTrace(boolean enabled)
      Enables load tracing for one mudlib boot.
  • Method Details

    • objectLoadStarted

      public void objectLoadStarted(String objectId, Path sourcePath, int depth)
      Description copied from interface: LPCObjectLoadObserver
      Called before the runtime starts loading a shared LPC object.
      Specified by:
      objectLoadStarted in interface LPCObjectLoadObserver
      Parameters:
      objectId - canonical mudlib object id
      sourcePath - resolved source path
      depth - current nested load depth
    • objectLoadFinished

      public void objectLoadFinished(String objectId, Path sourcePath, int depth, boolean loaded, long elapsedNanos)
      Description copied from interface: LPCObjectLoadObserver
      Called after the runtime finishes a shared LPC object load attempt.
      Specified by:
      objectLoadFinished in interface LPCObjectLoadObserver
      Parameters:
      objectId - canonical mudlib object id
      sourcePath - resolved source path
      depth - nested load depth reported at start
      loaded - whether the object was loaded or supplied successfully
      elapsedNanos - elapsed load time in nanoseconds
    • objectCompileFinished

      public void objectCompileFinished(String objectId, Path sourcePath, boolean compiled, long elapsedNanos)
      Description copied from interface: LPCObjectLoadObserver
      Called after the runtime finishes a source compilation attempt.
      Specified by:
      objectCompileFinished in interface LPCObjectLoadObserver
      Parameters:
      objectId - canonical mudlib object id
      sourcePath - resolved source path
      compiled - whether compilation completed without reported problems
      elapsedNanos - elapsed compile time in nanoseconds
    • objectCompileStarted

      public void objectCompileStarted(String objectId, Path sourcePath)
      Description copied from interface: LPCObjectLoadObserver
      Called before the runtime compiles a source file through LPCRuntime.compile(Path).
      Specified by:
      objectCompileStarted in interface LPCObjectLoadObserver
      Parameters:
      objectId - canonical mudlib object id
      sourcePath - resolved source path
    • objectLoadFailed

      public void objectLoadFailed(String objectId, Path sourcePath, int depth, Throwable failure)
      Description copied from interface: LPCObjectLoadObserver
      Called when a shared LPC object load fails with an exception.
      Specified by:
      objectLoadFailed in interface LPCObjectLoadObserver
      Parameters:
      objectId - canonical mudlib object id
      sourcePath - resolved source path
      depth - nested load depth reported at start
      failure - exception or error that prevented the load
    • objectCompileFailed

      public void objectCompileFailed(String objectId, Path sourcePath, Throwable failure)
      Description copied from interface: LPCObjectLoadObserver
      Called when a source compilation attempt fails with an exception.
      Specified by:
      objectCompileFailed in interface LPCObjectLoadObserver
      Parameters:
      objectId - canonical mudlib object id
      sourcePath - resolved source path
      failure - exception or error that prevented compilation
    • finishStartup

      public void finishStartup()
      Ends startup-only tracing before player sessions begin.
    • summary

      public String summary()
      Summarizes distinct objects and attempts observed during startup.
    • printSummaryIfEnabled

      public void printSummaryIfEnabled()
      Writes the summary only when detailed tracing was requested.