Class DummyProfiler

java.lang.Object
net.minecraft.util.profiler.DummyProfiler
All Implemented Interfaces:
Profiler, ReadableProfiler

public class DummyProfiler
extends Object
implements ReadableProfiler
  • Field Details

  • Constructor Details

    • DummyProfiler

      private DummyProfiler()
  • Method Details

    • startTick

      public void startTick()
      Specified by:
      startTick in interface Profiler
    • endTick

      public void endTick()
      Specified by:
      endTick in interface Profiler
    • push

      public void push​(String location)
      Specified by:
      push in interface Profiler
    • push

      public void push​(Supplier<String> locationGetter)
      Specified by:
      push in interface Profiler
    • pop

      public void pop()
      Specified by:
      pop in interface Profiler
    • swap

      public void swap​(String location)
      Specified by:
      swap in interface Profiler
    • swap

      @Environment(CLIENT) public void swap​(Supplier<String> locationGetter)
      Specified by:
      swap in interface Profiler
    • visit

      public 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.

      Specified by:
      visit in interface Profiler
      Parameters:
      marker - a unique marker
    • visit

      public 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.

      Specified by:
      visit in interface Profiler
      Parameters:
      markerGetter - the getter for a unique marker
    • getResult

      public ProfileResult getResult()
      Specified by:
      getResult in interface ReadableProfiler