Package net.minecraft.util.profiler
Interface Profiler
- All Known Subinterfaces:
ReadableProfiler
- All Known Implementing Classes:
DummyProfiler,ProfilerSystem
public interface Profiler
-
Method Summary
Modifier and Type Method Description voidendTick()voidpop()voidpush(String location)voidpush(Supplier<String> locationGetter)voidstartTick()voidswap(String location)voidswap(Supplier<String> locationGetter)static Profilerunion(Profiler profiler, Profiler profiler2)voidvisit(String marker)Increment the visit count for a marker.voidvisit(Supplier<String> markerGetter)Increment the visit count for a marker.
-
Method Details
-
startTick
void startTick() -
endTick
void endTick() -
push
-
push
-
pop
void pop() -
swap
-
swap
-
visit
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
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
-