Package net.minecraft.profiler
Class Profiler
- java.lang.Object
-
- net.minecraft.profiler.Profiler
-
- All Implemented Interfaces:
IProfiler
,IResultableProfiler
public class Profiler extends java.lang.Object implements IResultableProfiler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
Profiler.Section
-
Field Summary
Fields Modifier and Type Field Description private Profiler.Section
currentEntry
private java.util.Map<java.lang.String,Profiler.Section>
entries
private java.util.function.LongSupplier
getRealTime
private java.util.function.IntSupplier
getTickTime
private static org.apache.logging.log4j.Logger
LOGGER
private java.lang.String
path
private java.util.List<java.lang.String>
paths
private boolean
started
private long
startTimeNano
private it.unimi.dsi.fastutil.longs.LongList
startTimes
private int
startTimeTicks
private boolean
warn
private static long
WARNING_TIME_NANOS
-
Constructor Summary
Constructors Constructor Description Profiler(java.util.function.LongSupplier p_i231482_1_, java.util.function.IntSupplier p_i231482_2_, boolean p_i231482_3_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endTick()
private Profiler.Section
getCurrentEntry()
IProfileResult
getResults()
void
incrementCounter(java.lang.String p_230035_1_)
void
incrementCounter(java.util.function.Supplier<java.lang.String> p_230036_1_)
void
pop()
void
popPush(java.lang.String p_219895_1_)
void
popPush(java.util.function.Supplier<java.lang.String> p_194339_1_)
void
push(java.lang.String p_76320_1_)
void
push(java.util.function.Supplier<java.lang.String> p_194340_1_)
void
startTick()
-
-
-
Field Detail
-
WARNING_TIME_NANOS
private static final long WARNING_TIME_NANOS
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
paths
private final java.util.List<java.lang.String> paths
-
startTimes
private final it.unimi.dsi.fastutil.longs.LongList startTimes
-
entries
private final java.util.Map<java.lang.String,Profiler.Section> entries
-
getTickTime
private final java.util.function.IntSupplier getTickTime
-
getRealTime
private final java.util.function.LongSupplier getRealTime
-
startTimeNano
private final long startTimeNano
-
startTimeTicks
private final int startTimeTicks
-
path
private java.lang.String path
-
started
private boolean started
-
currentEntry
@Nullable private Profiler.Section currentEntry
-
warn
private final boolean warn
-
-
Method Detail
-
push
public void push(java.util.function.Supplier<java.lang.String> p_194340_1_)
-
popPush
public void popPush(java.lang.String p_219895_1_)
-
popPush
public void popPush(java.util.function.Supplier<java.lang.String> p_194339_1_)
-
getCurrentEntry
private Profiler.Section getCurrentEntry()
-
incrementCounter
public void incrementCounter(java.lang.String p_230035_1_)
- Specified by:
incrementCounter
in interfaceIProfiler
-
incrementCounter
public void incrementCounter(java.util.function.Supplier<java.lang.String> p_230036_1_)
- Specified by:
incrementCounter
in interfaceIProfiler
-
getResults
public IProfileResult getResults()
- Specified by:
getResults
in interfaceIResultableProfiler
-
-