public interface Profiler
Modifier and Type | Method and 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.
|
void startTick()
void endTick()
void push(String location)
void pop()
void swap(String location)
void visit(String marker)
This is useful to keep track of number of calls made to performance- wise expensive methods.
marker
- a unique markervoid 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.
markerGetter
- the getter for a unique marker