Minecraft:Commands/jfr: Difference between revisions
More actions
imported>Outrowed separate WP and JEP linking |
Fix template calls: add MC/ prefix |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{Exclusive|java}} | {{MC/Exclusive|java}} | ||
{{Infobox command | {{Infobox command | ||
| Line 6: | Line 6: | ||
}} | }} | ||
Starts and stops profiling with {{ | Starts and stops profiling with {{MC/W|Java Flight Recorder}} ([https://openjdk.java.net/jeps/328 JEP]) as well as a few custom events. | ||
==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 {{ | 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 {{MC/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 | **'''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''' | ** '''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 | **'''Chunk Generation''': time taken to generate individual chunk stages. | ||
**'''Create/Load World''': initial | **'''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 44: | Line 44: | ||
== Output == | == Output == | ||
{{Output table}} | {{MC/Output table}} | ||
{{Output table|edition=je|On fail|N/A|0|0}} | {{MC/Output table|edition=je|On fail|N/A|0|0}} | ||
{{Output table|On success|N/A|1|1}} | {{MC/Output table|On success|N/A|1|1}} | ||
{{Output table}} | {{MC/Output table}} | ||
== History == | == History == | ||
{{HistoryTable | {{HistoryTable | ||
|{{HistoryLine|java}} | |{{MC/HistoryLine|java}} | ||
|{{HistoryLine||1.18|dev=21w37a|Added {{ | |{{HistoryLine||1.18|dev=21w37a|Added {{MC/Cmd|jfr|link=none}}.}} | ||
}} | }} | ||
== Navigation == | == Navigation == | ||
{{Navbox commands}} | {{MC/Navbox commands}} | ||
de:Befehl/jfr | |||
es:Comandos/jfr | |||
ja:コマンド/jfr | |||
lzh:令/jfr | |||
pt:Comandos/jfr | |||
zh:命令/jfr | |||
Latest revision as of 20:11, 9 April 2026
Script error: No such module "Exclusive".
Starts and stops profiling with
- REDIRECT Template:Wikipedia
Template:Redr (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
- REDIRECT Template:Code
Template:Redr 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
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On fail}}{{#vardefine:output1-{{#var:output-table-lines}}|N/A}}{{#vardefine:output2-{{#var:output-table-lines}}|0}}{{#vardefine:output3-{{#var:output-table-lines}}|0}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-editions-num|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-{{#var:output-editions-num}}|je}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|1}} {{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:situation-{{#var:output-table-lines}}|On success}}{{#vardefine:output1-{{#var:output-table-lines}}|N/A}}{{#vardefine:output2-{{#var:output-table-lines}}|1}}{{#vardefine:output3-{{#var:output-table-lines}}|1}}{{#vardefine:command-row-{{#var:commands-num}}|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-edition-row-{{#var:output-editions-num}}|Expression error: Unrecognized punctuation character "{".}}
{{#vardefine:output-table-lines|Expression error: Unrecognized punctuation character "{".}}{{#vardefine:output-table-lines|-2}}{{#vardefine:output-table-lines-now|}}{{#vardefine:command-num-now|}}{{#vardefine:command-line-now|}}{{#vardefine:commands-num|}}{{#vardefine:output-edition-num-now|}}{{#vardefine:output-edition-line-now|}}{{#vardefine:output-editions-num|}}{{#vardefine:je-outputs-dis|}}
History
de:Befehl/jfr es:Comandos/jfr ja:コマンド/jfr lzh:令/jfr pt:Comandos/jfr zh:命令/jfr