Created
November 20, 2023 11:38
-
-
Save parttimenerd/a3b0c74eea0c1da89fec533ebd468479 to your computer and use it in GitHub Desktop.
Custom JFR events defined in Minecraft, obtained by using `jfr metadata` on a generated JFR file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Name("minecraft.ChunkGeneration") | |
@Label("Chunk Generation") | |
@Category({"Minecraft", "World Generation"}) | |
class ChunkGeneration extends jdk.jfr.Event { | |
@Label("Start Time") | |
@Timestamp("TICKS") | |
long startTime; | |
@Label("Duration") | |
@Timespan("TICKS") | |
long duration; | |
@Label("Event Thread") | |
@Description("Thread in which event was committed in") | |
Thread eventThread; | |
@Label("Stack Trace") | |
@Description("Stack Trace starting from the method the event was committed in") | |
StackTrace stackTrace; | |
@Label("First Block X World Position") | |
int worldPosX; | |
@Label("First Block Z World Position") | |
int worldPosZ; | |
@Label("Chunk X Position") | |
int chunkPosX; | |
@Label("Chunk Z Position") | |
int chunkPosZ; | |
@Label("Status") | |
String status; | |
@Label("Level") | |
String level; | |
} | |
@Name("minecraft.LoadWorld") | |
@Label("Create/Load World") | |
@Category({"Minecraft", "World Generation"}) | |
class LoadWorld extends jdk.jfr.Event { | |
@Label("Start Time") | |
@Timestamp("TICKS") | |
long startTime; | |
@Label("Duration") | |
@Timespan("TICKS") | |
long duration; | |
@Label("Event Thread") | |
@Description("Thread in which event was committed in") | |
Thread eventThread; | |
@Label("Stack Trace") | |
@Description("Stack Trace starting from the method the event was committed in") | |
StackTrace stackTrace; | |
} | |
@Name("minecraft.NetworkSummary") | |
@Label("Network Summary") | |
@Category({"Minecraft", "Network"}) | |
class NetworkSummary extends jdk.jfr.Event { | |
@Label("Start Time") | |
@Timestamp("TICKS") | |
long startTime; | |
@Label("Duration") | |
@Timespan("TICKS") | |
long duration; | |
@Label("Event Thread") | |
@Description("Thread in which event was committed in") | |
Thread eventThread; | |
@Label("Stack Trace") | |
@Description("Stack Trace starting from the method the event was committed in") | |
StackTrace stackTrace; | |
@Label("Remote Address") | |
String remoteAddress; | |
@Label("Sent Bytes") | |
@DataAmount("BYTES") | |
long sentBytes; | |
@Label("Sent Packets") | |
int sentPackets; | |
@Label("Received Bytes") | |
@DataAmount("BYTES") | |
long receivedBytes; | |
@Label("Received Packets") | |
int receivedPackets; | |
} | |
@Name("minecraft.PacketReceived") | |
@Category({"Minecraft", "Network"}) | |
@Label("Network Packet Received") | |
class PacketReceived extends jdk.jfr.Event { | |
@Label("Start Time") | |
@Timestamp("TICKS") | |
long startTime; | |
@Label("Duration") | |
@Timespan("TICKS") | |
long duration; | |
@Label("Event Thread") | |
@Description("Thread in which event was committed in") | |
Thread eventThread; | |
@Label("Stack Trace") | |
@Description("Stack Trace starting from the method the event was committed in") | |
StackTrace stackTrace; | |
@Label("Protocol Id") | |
String protocolId; | |
@Label("Packet Id") | |
int packetId; | |
@Label("Remote Address") | |
String remoteAddress; | |
@Label("Bytes") | |
@DataAmount("BYTES") | |
int bytes; | |
} | |
@Name("minecraft.PacketSent") | |
@Category({"Minecraft", "Network"}) | |
@Label("Network Packet Sent") | |
class PacketSent extends jdk.jfr.Event { | |
@Label("Start Time") | |
@Timestamp("TICKS") | |
long startTime; | |
@Label("Duration") | |
@Timespan("TICKS") | |
long duration; | |
@Label("Event Thread") | |
@Description("Thread in which event was committed in") | |
Thread eventThread; | |
@Label("Stack Trace") | |
@Description("Stack Trace starting from the method the event was committed in") | |
StackTrace stackTrace; | |
@Label("Protocol Id") | |
String protocolId; | |
@Label("Packet Id") | |
int packetId; | |
@Label("Remote Address") | |
String remoteAddress; | |
@Label("Bytes") | |
@DataAmount("BYTES") | |
int bytes; | |
} | |
@Name("minecraft.ServerTickTime") | |
@Label("Server Tick Time") | |
@Category({"Minecraft", "Ticking"}) | |
class ServerTickTime extends jdk.jfr.Event { | |
@Label("Start Time") | |
@Timestamp("TICKS") | |
long startTime; | |
@Label("Duration") | |
@Timespan("TICKS") | |
long duration; | |
@Label("Event Thread") | |
@Description("Thread in which event was committed in") | |
Thread eventThread; | |
@Label("Stack Trace") | |
@Description("Stack Trace starting from the method the event was committed in") | |
StackTrace stackTrace; | |
@Label("Average Server Tick Duration") | |
@Timespan("NANOSECONDS") | |
long averageTickDuration; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment