Package net.minecraft.util.profiler
Class ProfileResultImpl
java.lang.Object
net.minecraft.util.profiler.ProfileResultImpl
- All Implemented Interfaces:
ProfileResult
public class ProfileResultImpl extends Object implements ProfileResult
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
ProfileResultImpl.CounterInfo
-
Field Summary
Fields Modifier and Type Field Description private static Comparator<Map.Entry<String,ProfileResultImpl.CounterInfo>>
COMPARATOR
private static ProfileLocationInfo
EMPTY_INFO
private int
endTick
private long
endTime
private Map<String,? extends ProfileLocationInfo>
locationInfos
private static Logger
LOGGER
private static Splitter
SPLITTER
private int
startTick
private long
startTime
private int
tickDuration
-
Constructor Summary
Constructors Constructor Description ProfileResultImpl(Map<String,? extends ProfileLocationInfo> locationInfos, long startTime, int startTick, long endTime, int endTick)
-
Method Summary
Modifier and Type Method Description private void
appendCounter(int depth, String name, ProfileResultImpl.CounterInfo info, int tickSpan, StringBuilder sb)
private void
appendCounterDump(Map<String,ProfileResultImpl.CounterInfo> counters, StringBuilder sb, int tickSpan)
private void
appendTiming(int level, String name, StringBuilder sb)
protected String
asString(long timeSpan, int tickSpan)
private static String
generateWittyComment()
int
getEndTick()
long
getEndTime()
private ProfileLocationInfo
getInfo(String path)
int
getStartTick()
long
getStartTime()
int
getTickSpan()
List<ProfilerTiming>
getTimings(String parentPath)
private static StringBuilder
indent(StringBuilder sb, int size)
private static boolean
isSubpath(String parent, String path)
boolean
save(File file)
private Map<String,ProfileResultImpl.CounterInfo>
setupCounters()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.util.profiler.ProfileResult
getTimeSpan
-
Field Details
-
LOGGER
-
EMPTY_INFO
-
SPLITTER
-
COMPARATOR
-
locationInfos
-
startTime
private final long startTime -
startTick
private final int startTick -
endTime
private final long endTime -
endTick
private final int endTick -
tickDuration
private final int tickDuration
-
-
Constructor Details
-
ProfileResultImpl
public ProfileResultImpl(Map<String,? extends ProfileLocationInfo> locationInfos, long startTime, int startTick, long endTime, int endTick)
-
-
Method Details
-
getInfo
-
getTimings
- Specified by:
getTimings
in interfaceProfileResult
-
isSubpath
-
setupCounters
-
getStartTime
public long getStartTime()- Specified by:
getStartTime
in interfaceProfileResult
-
getStartTick
public int getStartTick()- Specified by:
getStartTick
in interfaceProfileResult
-
getEndTime
public long getEndTime()- Specified by:
getEndTime
in interfaceProfileResult
-
getEndTick
public int getEndTick()- Specified by:
getEndTick
in interfaceProfileResult
-
save
- Specified by:
save
in interfaceProfileResult
-
asString
-
indent
-
appendTiming
-
appendCounter
private void appendCounter(int depth, String name, ProfileResultImpl.CounterInfo info, int tickSpan, StringBuilder sb) -
appendCounterDump
private void appendCounterDump(Map<String,ProfileResultImpl.CounterInfo> counters, StringBuilder sb, int tickSpan) -
generateWittyComment
-
getTickSpan
public int getTickSpan()- Specified by:
getTickSpan
in interfaceProfileResult
-