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 remoteAddress) onChunkGenerate
(ChunkPos chunkPos, ResourceKey<Level> level, String name) void
onPacketReceived
(ConnectionProtocol protocol, PacketType<?> packetType, SocketAddress address, int size) void
onPacketSent
(ConnectionProtocol protocol, PacketType<?> packetType, SocketAddress address, int size) void
onRegionFileRead
(RegionStorageInfo regionStorageInfo, ChunkPos chunkPos, RegionFileVersion version, int bytes) void
onRegionFileWrite
(RegionStorageInfo regionStorageInfo, ChunkPos chunkPos, RegionFileVersion version, int bytes) void
onServerTick
(float currentAverageTickTime) private void
private boolean
start
(Reader reader, Environment environment) boolean
start
(Environment environment) 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 currentAverageTickTime) - Specified by:
onServerTick
in interfaceJvmProfiler
-
onPacketReceived
public void onPacketReceived(ConnectionProtocol protocol, PacketType<?> packetType, SocketAddress address, int size) - Specified by:
onPacketReceived
in interfaceJvmProfiler
-
onPacketSent
public void onPacketSent(ConnectionProtocol protocol, PacketType<?> packetType, SocketAddress address, int size) - Specified by:
onPacketSent
in interfaceJvmProfiler
-
networkStatFor
-
onRegionFileRead
public void onRegionFileRead(RegionStorageInfo regionStorageInfo, ChunkPos chunkPos, RegionFileVersion version, int bytes) - Specified by:
onRegionFileRead
in interfaceJvmProfiler
-
onRegionFileWrite
public void onRegionFileWrite(RegionStorageInfo regionStorageInfo, ChunkPos chunkPos, RegionFileVersion version, int bytes) - Specified by:
onRegionFileWrite
in interfaceJvmProfiler
-
onWorldLoadedStarted
- Specified by:
onWorldLoadedStarted
in interfaceJvmProfiler
-
onChunkGenerate
@Nullable public ProfiledDuration onChunkGenerate(ChunkPos chunkPos, ResourceKey<Level> level, String name) - Specified by:
onChunkGenerate
in interfaceJvmProfiler
-