public class DummyProfiler extends Object implements ReadableProfiler
Modifier and Type | Field and Description |
---|---|
static DummyProfiler |
INSTANCE |
Modifier | Constructor and Description |
---|---|
private |
DummyProfiler() |
Modifier and Type | Method and 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.
|
public static final DummyProfiler INSTANCE
public void visit(String marker)
This is useful to keep track of number of calls made to performance- wise expensive methods.
public void visit(Supplier<String> markerGetter)
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.
public ProfileResult getResult()
getResult
in interface ReadableProfiler