Class CriticalProfiler
java.lang.Object
etithespirit.orimod.util.profiling.CriticalProfiler
A profiler for the Ori mod. It is very similar to MC's ActiveProfiler but has some slight differences.
It is deprecated in favor of using MC's built in stuff.
-
Constructor Summary
ConstructorsConstructorDescriptionCriticalProfiler
(org.apache.logging.log4j.Logger log, LongSupplier nanoSupplier, long warnTimeNanos, long totalWarnTimeNanos) -
Method Summary
-
Constructor Details
-
CriticalProfiler
public CriticalProfiler(org.apache.logging.log4j.Logger log, LongSupplier nanoSupplier, long warnTimeNanos, long totalWarnTimeNanos) - Parameters:
log
- The logger to use.nanoSupplier
- A supplier that returns the current system time in nanoseconds.warnTimeNanos
- The amount of time that any subroutine must remain under, lest a warning is posted.totalWarnTimeNanos
- The amount of time that the entire profiling operation must remain under, lest a warning is posted.
-
-
Method Details
-
isLive
public boolean isLive()- Returns:
- Whether or not this profiler is profiling right now.
-
profileBegin
public void profileBegin()Begins the profiling process. -
profileEnd
public void profileEnd()Ends the profiling process. -
push
Starts a new subroutine.- Parameters:
routine
- The name of the routine.
-
pop
public void pop()Jumps out of the current subroutine. -
popPush
Jumps out of the current subroutine, then jumps into a new one.- Parameters:
newRoutine
- The name of the new routine.
-