Interface Profiler

All Known Subinterfaces:
ReadableProfiler
All Known Implementing Classes:
DummyProfiler, ProfilerSystem

public interface Profiler
  • Method Details

    • startTick

      void startTick()
    • endTick

      void endTick()
    • push

      void push​(String location)
    • push

      void push​(Supplier<String> locationGetter)
    • pop

      void pop()
    • swap

      void swap​(String location)
    • swap

      @Environment(CLIENT) void swap​(Supplier<String> locationGetter)
    • visit

      void visit​(String marker)
      Increment the visit count for a marker.

      This is useful to keep track of number of calls made to performance- wise expensive methods.

      Parameters:
      marker - a unique marker
    • visit

      void visit​(Supplier<String> markerGetter)
      Increment the visit count for a marker.

      This is useful to keep track of number of calls made to performance- wise expensive methods.

      This method is preferred if getting the marker is costly; the supplier won't be called if the profiler is disabled.

      Parameters:
      markerGetter - the getter for a unique marker
    • union

      static Profiler union​(Profiler profiler, Profiler profiler2)