public class ProfilerUtil
extends java.lang.Object
Profiler
to a file or something else.Modifier and Type | Class and Description |
---|---|
static interface |
ProfilerUtil.ILogAcceptor<E extends java.lang.Throwable> |
Constructor and Description |
---|
ProfilerUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
printProfilerResults(net.minecraft.profiler.Profiler profiler,
java.lang.String rootName)
Calls
writeProfilerResults(Profiler, String, ILogAcceptor) with System.out as the
ProfilerUtil.ILogAcceptor . |
static void |
saveProfilerResults(net.minecraft.profiler.Profiler profiler,
java.lang.String rootName,
java.io.File dest)
Calls
writeProfilerResults(Profiler, String, ILogAcceptor) but saves the output to a file. |
static void |
saveProfilerResults(net.minecraft.profiler.Profiler profiler,
java.lang.String rootName,
java.nio.file.Path dest)
Calls
writeProfilerResults(Profiler, String, ILogAcceptor) but saves the output to a file. |
static <E extends java.lang.Throwable> |
writeProfilerResults(net.minecraft.profiler.Profiler profiler,
java.lang.String rootName,
ProfilerUtil.ILogAcceptor<E> dest) |
public static void printProfilerResults(net.minecraft.profiler.Profiler profiler, java.lang.String rootName)
writeProfilerResults(Profiler, String, ILogAcceptor)
with System.out
as the
ProfilerUtil.ILogAcceptor
.public static void saveProfilerResults(net.minecraft.profiler.Profiler profiler, java.lang.String rootName, java.io.File dest) throws java.io.IOException
writeProfilerResults(Profiler, String, ILogAcceptor)
but saves the output to a file.java.io.IOException
- if the file exists but is a directory rather than a regular file, does not exist but cannot
be created, or cannot be opened for any other reason, or if an I/O exception occurred while wrting
the profiler results.public static void saveProfilerResults(net.minecraft.profiler.Profiler profiler, java.lang.String rootName, java.nio.file.Path dest) throws java.io.IOException
writeProfilerResults(Profiler, String, ILogAcceptor)
but saves the output to a file.java.io.IOException
- if the file exists but is a directory rather than a regular file, does not exist but cannot
be created, or cannot be opened for any other reason, or if an I/O exception occurred while writing
the profiler results.public static <E extends java.lang.Throwable> void writeProfilerResults(net.minecraft.profiler.Profiler profiler, java.lang.String rootName, ProfilerUtil.ILogAcceptor<E> dest) throws E extends java.lang.Throwable
profiler
- rootName
- The base name to use. Most of the time you just want to use "root".dest
- The method to call with the finished lines.E
- if ProfilerUtil.ILogAcceptor.write(String)
throws an exception.E extends java.lang.Throwable