Package net.minecraft.util.profiler
Class DummyProfiler
java.lang.Object
net.minecraft.util.profiler.DummyProfiler
- All Implemented Interfaces:
Profiler,ReadableProfiler
public class DummyProfiler extends Object implements ReadableProfiler
-
Field Summary
Fields Modifier and Type Field Description static DummyProfilerINSTANCE -
Constructor Summary
Constructors Modifier Constructor Description privateDummyProfiler() -
Method Summary
Modifier and Type Method Description voidendTick()ProfileResultgetResult()voidpop()voidpush(String location)voidpush(Supplier<String> locationGetter)voidstartTick()voidswap(String location)voidswap(Supplier<String> locationGetter)voidvisit(String marker)Increment the visit count for a marker.voidvisit(Supplier<String> markerGetter)Increment the visit count for a marker.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
DummyProfiler
private DummyProfiler()
-
-
Method Details
-
startTick
public void startTick() -
endTick
public void endTick() -
push
-
push
-
pop
public 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.
-
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.
-
getResult
- Specified by:
getResultin interfaceReadableProfiler
-