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 DummyProfiler
INSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description private
DummyProfiler()
-
Method Summary
Modifier and Type Method Description void
endTick()
ProfileResult
getResult()
void
pop()
void
push(String location)
void
push(Supplier<String> locationGetter)
void
startTick()
void
swap(String location)
void
swap(Supplier<String> locationGetter)
void
visit(String marker)
Increment the visit count for a marker.void
visit(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:
getResult
in interfaceReadableProfiler
-