Commands/perf

Minecraft Wiki article. Categories: Java_Edition, Commands

📌 Mirrored from Minecraft Wiki

This article is reproduced from Commands/perf on the Minecraft Wiki. Mirrored from revision 2814129. It is licensed CC BY-NC-SA 3.0 by the Minecraft Wiki contributors — not under the Codex’s CC BY-SA 4.0, and it may not be used commercially. Edits belong upstream, not here.

This feature is exclusive to Java Edition.
 
/perf

Captures information and metrics about the game such as tick durations, used heap sizes, and other more detailed stats.

Note that this command can only be executed on a dedicated server; use F3 + L run the performance profiler on a locally hosted world.

Usage

When a performance profiling session is stopped, a ZIP file is created in .minecraft/debug/profiling with the following structure:

  • yyyy-MM-dd_HH.mm.ss-<world name>-<game version>.zip
    • system.txt
    • server
      • deviations
        • ticktime
          • <current tick>@yyyy-MM-dd_HH.mm.ss.SSS.txt
      • levels
        • <namespace>
          • <dimension name>
            • block_entities.csv: Contains a list of block entities in the world in the format x,y,z,type.
            • chunks.csv: Contains a list of chunk information in the format x,z,level,in_memory,status,full_status,accessible_ready,ticking_ready,entity_ticking_ready,ticket,spawning,entity_count,block_entity_count.
            • entities.csv: Contains a list of entities in the world in the format x,y,z,uuid,type,alive,custom_name.
            • entity_chunks.csv: Contains a list of loaded chunks in the dimension in the format x,y,z,visibility,load_status,entity_count.
            • example_crash.txt: An example crash file.
            • stats.txt: Contains some stats.
      • metrics
        • cpu.csv
        • event_loops.csv
        • jvm.csv
        • mailboxes.csv
        • ticking.csv
      • classpath.txt: Contains file paths of external jars the game is using.
      • gamerules.txt: A plain text file containing a list of game rules and their values (<gamerule>=<value>).
      • modules.txt: Contains external modules the game is using.
      • profiling.txt: The profiler results.
      • server.properties.txt: Current server.properties.
      • stats.txt: Contains some stats.
      • threads.txt: All running threads.

Syntax

perf start
Starts a 10-second performance profiling recording.
perf stop
Ends the recording early before 10 seconds have passed.

Result

CommandTriggerJava Edition
AnyThe command is incomplete. Unparseable
/perf startA performance profiling session has already been started. Failed
/perf stopNo performance profiling session is running.
AnyOtherwiseSuccessful

Outputs

CommandEditionSituationSuccess Count/execute store success .../execute store result ...
AnyJava EditionOn failN/A00
On successN/A10

History

Java Edition
1.17Pre-release 1Added /perf.

Sources