Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Commands/jfr: Difference between revisions

From SAS Gaming Wiki
imported>Outrowed
separate WP and JEP linking
 
SyncBot (talk | contribs)
Remove broken links to missing pages
Line 9: Line 9:


==Usage==
==Usage==
When profiling, it records several information about CPU, memory, and threads usage of the client while it was running, and saves them on a <code>.jfr</code> file under the {{cd|[[Minecraft:.minecraft]]/debug}} folder.
When profiling, it records several information about CPU, memory, and threads usage of the client while it was running, and saves them on a <code>.jfr</code> file under the {{cd|.minecraft/debug}} folder.


The file can be opened using an external tool or software, such as [https://visualvm.github.io/ VisualVM] or [https://github.com/openjdk/jmc JMC]. It contains JVM and operating system events, with several ''Minecraft''-related custom events below:
The file can be opened using an external tool or software, such as [https://visualvm.github.io/ VisualVM] or [https://github.com/openjdk/jmc JMC]. It contains JVM and operating system events, with several ''Minecraft''-related custom events below:
<!-- Documentation with names taken from VisualVM program -->
<!-- Documentation with names taken from VisualVM program -->
* '''Network''' group, which contains:
* '''Network''' group, which contains:
**'''Network Packet Received''' and '''Network Packet Sent''': network packet events, containing information about their protocol ID, packet ID, packet direction (server or client bound), remote address, and bytes size. See [[Minecraft:Java Edition protocol]] for list of protocol and packet IDs.
**'''Network Packet Received''' and '''Network Packet Sent''': network packet events, containing information about their protocol ID, packet ID, packet direction (server or client bound), remote address, and bytes size. See Java Edition protocol for list of protocol and packet IDs.
**'''Network Summary''': summary information of received and sent packets count and their bytes size.
**'''Network Summary''': summary information of received and sent packets count and their bytes size.


* '''Storage''' group, which contains:
* '''Storage''' group, which contains:
** '''Region File Read''' and '''Region File Write''': [[Minecraft:region file]] events, containing information about region and chunk positions, dimension, and type of compression algorithm.
** '''Region File Read''' and '''Region File Write''': region file events, containing information about region and chunk positions, dimension, and type of compression algorithm.


* '''Ticking''' group, which only contains a single custom event:
* '''Ticking''' group, which only contains a single custom event:
Line 24: Line 24:


*'''World Generation''' group, which contains:
*'''World Generation''' group, which contains:
**'''Chunk Generation''': time taken to generate individual [[Minecraft:chunk]] stages.
**'''Chunk Generation''': time taken to generate individual chunk stages.
**'''Create/Load World''': initial [[Minecraft:world]] loading duration when loading a world.
**'''Create/Load World''': initial world loading duration when loading a world.


The <code>.jfr</code> file is accompanied by a summary [[Minecraft:JSON]] report is written both to the log file and in the debug folder.
The <code>.jfr</code> file is accompanied by a summary [[Minecraft:JSON]] report is written both to the log file and in the debug folder.
Line 58: Line 58:
{{Navbox commands}}
{{Navbox commands}}


[[Minecraft:de:Befehl/jfr]]
de:Befehl/jfr
[[Minecraft:es:Comandos/jfr]]
es:Comandos/jfr
[[Minecraft:ja:コマンド/jfr]]
ja:コマンド/jfr
[[Minecraft:lzh:令/jfr]]
lzh:令/jfr
[[Minecraft:pt:Comandos/jfr]]
pt:Comandos/jfr
[[Minecraft:zh:命令/jfr]]
zh:命令/jfr

Revision as of 15:44, 9 April 2026

Template:Exclusive

Template:Infobox command

Starts and stops profiling with Template:W (JEP) as well as a few custom events.

Usage

When profiling, it records several information about CPU, memory, and threads usage of the client while it was running, and saves them on a .jfr file under the Template:Cd folder.

The file can be opened using an external tool or software, such as VisualVM or JMC. It contains JVM and operating system events, with several Minecraft-related custom events below:

  • Network group, which contains:
    • Network Packet Received and Network Packet Sent: network packet events, containing information about their protocol ID, packet ID, packet direction (server or client bound), remote address, and bytes size. See Java Edition protocol for list of protocol and packet IDs.
    • Network Summary: summary information of received and sent packets count and their bytes size.
  • Storage group, which contains:
    • Region File Read and Region File Write: region file events, containing information about region and chunk positions, dimension, and type of compression algorithm.
  • Ticking group, which only contains a single custom event:
    • Server Tick Time: sampling event of the average server tick duration at one second intervals.
  • World Generation group, which contains:
    • Chunk Generation: time taken to generate individual chunk stages.
    • Create/Load World: initial world loading duration when loading a world.

The .jfr file is accompanied by a summary Minecraft:JSON report is written both to the log file and in the debug folder.

Syntax

jfr start
Start JFR profiling.
jfr stop
Stop JFR profiling.

Result

Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table

Output

Template:Output table Template:Output table Template:Output table Template:Output table

History

Template:HistoryTable

Navigation

Template:Navbox commands

de:Befehl/jfr es:Comandos/jfr ja:コマンド/jfr lzh:令/jfr pt:Comandos/jfr zh:命令/jfr