Package net.minecraft.util.profiling.jfr
Class JfrProfiler
java.lang.Object
net.minecraft.util.profiling.jfr.JfrProfiler
- All Implemented Interfaces:
JvmProfiler
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.util.profiling.jfr.JvmProfiler
JvmProfiler.NoOpProfiler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate float
private static final DateTimeFormatter
private static final String
private static final JfrProfiler
private static final org.slf4j.Logger
static final String
private final Map
<String, NetworkSummaryEvent.SumAggregation> (package private) Recording
static final String
static final String
static final String
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JfrProfiler
boolean
boolean
networkStatFor
(SocketAddress pRemoteAddress) onChunkGenerate
(ChunkPos pChunkPos, ResourceKey<Level> pLevel, String pName) void
onPacketReceived
(ConnectionProtocol pProtocol, PacketType<?> pPacketType, SocketAddress pAddress, int pSize) void
onPacketSent
(ConnectionProtocol pProtocol, PacketType<?> pPacketType, SocketAddress pAddress, int pSize) void
onRegionFileRead
(RegionStorageInfo pRegionStorageInfo, ChunkPos pChunkPos, RegionFileVersion pVersion, int pBytes) void
onRegionFileWrite
(RegionStorageInfo pRegionStorageInfo, ChunkPos pChunkPos, RegionFileVersion pVersion, int pBytes) void
onServerTick
(float pCurrentAverageTickTime) private void
private boolean
start
(Reader pReader, Environment pEnvironment) boolean
start
(Environment pEnvironment) stop()
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
ROOT_CATEGORY
- See Also:
-
WORLD_GEN_CATEGORY
- See Also:
-
TICK_CATEGORY
- See Also:
-
NETWORK_CATEGORY
- See Also:
-
STORAGE_CATEGORY
- See Also:
-
CUSTOM_EVENTS
-
FLIGHT_RECORDER_CONFIG
- See Also:
-
DATE_TIME_FORMATTER
-
INSTANCE
-
recording
-
currentAverageTickTime
private float currentAverageTickTime -
networkTrafficByAddress
-
-
Constructor Details
-
JfrProfiler
private JfrProfiler()
-
-
Method Details
-
getInstance
-
start
- Specified by:
start
in interfaceJvmProfiler
-
stop
- Specified by:
stop
in interfaceJvmProfiler
-
isRunning
public boolean isRunning()- Specified by:
isRunning
in interfaceJvmProfiler
-
isAvailable
public boolean isAvailable()- Specified by:
isAvailable
in interfaceJvmProfiler
-
start
-
setupSummaryListener
private void setupSummaryListener() -
onServerTick
public void onServerTick(float pCurrentAverageTickTime) - Specified by:
onServerTick
in interfaceJvmProfiler
-
onPacketReceived
public void onPacketReceived(ConnectionProtocol pProtocol, PacketType<?> pPacketType, SocketAddress pAddress, int pSize) - Specified by:
onPacketReceived
in interfaceJvmProfiler
-
onPacketSent
public void onPacketSent(ConnectionProtocol pProtocol, PacketType<?> pPacketType, SocketAddress pAddress, int pSize) - Specified by:
onPacketSent
in interfaceJvmProfiler
-
networkStatFor
-
onRegionFileRead
public void onRegionFileRead(RegionStorageInfo pRegionStorageInfo, ChunkPos pChunkPos, RegionFileVersion pVersion, int pBytes) - Specified by:
onRegionFileRead
in interfaceJvmProfiler
-
onRegionFileWrite
public void onRegionFileWrite(RegionStorageInfo pRegionStorageInfo, ChunkPos pChunkPos, RegionFileVersion pVersion, int pBytes) - Specified by:
onRegionFileWrite
in interfaceJvmProfiler
-
onWorldLoadedStarted
- Specified by:
onWorldLoadedStarted
in interfaceJvmProfiler
-
onChunkGenerate
@Nullable public ProfiledDuration onChunkGenerate(ChunkPos pChunkPos, ResourceKey<Level> pLevel, String pName) - Specified by:
onChunkGenerate
in interfaceJvmProfiler
-