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 void
endTick()
void
pop()
void
push(String location)
void
push(Supplier<String> locationGetter)
void
startTick()
void
swap(String location)
void
swap(Supplier<String> locationGetter)
static Profiler
union(Profiler profiler, Profiler profiler2)
void
visit(String marker)
Increment the visit count for a marker.void
visit(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
-