Skip to content

Latest commit

 

History

History
48 lines (38 loc) · 4.04 KB

FILE_FORMAT.md

File metadata and controls

48 lines (38 loc) · 4.04 KB

File format

This timings viewer supports both legacy v1 reports and PocketMine-MP tree-style reports. The format of a tree-style report is described below.

Records

  • Each timings record must be placed on a new line and indented by 4 (four) spaces.
  • Timings records may be grouped into categories. Category names must be placed on a new line with no indentation. Records in that group must be placed below the category name.
    • The category Minecraft MUST be present. All other categories are optional.
  • A separate record must be generated for each unique parent record.
    • This means that multiple records may be generated by the same timer if it was activated under different parent timers.
    • For example, Player Network Send may be activated from many places, such as Entity Tick, Connection Handler, etc.. A different record should be generated for each place.

For each record, the following fields must be provided, in the order specified:

Field Accepted values Description
N/A String The name of the timer
Time Integer Total time the timer was active for, in nanoseconds
Count Integer The number of times the timer was activated
Avg Float Not used, but required for v1 compatibility
Violations Integer Number of server ticks the timer caused the server to fall behind by
RecordId Integer Unique timings record ID for this entry (used to locate timer parents for tree view)
ParentRecordId Integer Unique timings record ID for the parent record active when this timer record was created (used for tree view)
TimerId Integer Unique timer ID that created this record (used for list view to add together records from the same timer)
Ticks Integer Number of server ticks this record was active on (used to calculate averages)
Peak Integer Peak time the timer was active for, in nanoseconds

Report metadata

At the foot of the file, report metadata is provided. All metadata is optional, but recommended.

Metadata lines should be placed on a new line starting with a #.

The following metadata fields are used by the viewer:

Field Description
Version Minecraft version supported by the server which generated this report
PocketMine-MP PocketMine-MP version which generated this report
FormatVersion Format version of this report (currently 1. If omitted, the report will be treated as a legacy Aikar timings report.

Sample time

The report sample time MUST be provided on the last line of the report. This is used to calculate server load totals and TPS.

The time is provided in nanoseconds, followed by the time formatted in seconds in brackets.

Example reports