The bug
The debug profiler says 'ticks' for one tick.
How to reproduce
Press F3 + L twice
Navigate to your minecraft folder -> debug -> profiling, and extract the contents of the .zip file
Open the deviations folder
Open any file
❌ Even though only one tick is shown, the text says '1 ticks'
Code analysis
Code analysis by @unknown can be found in this comment.
Linked issues
relates to 1
Comments 5
This is not new to the snapshot or specific to the client reports; the server reports (/debug) are exactly the same. So I added 1.16.5
I can confirm this in both 1.18.1 and 1.18.2 Pre-release 1. Here's a code analysis of this issue.
Code Analysis:
The following is based on a decompiled version of Minecraft 1.18.1 using MCP-Reborn.
net.minecraft.util.profiling.FilledProfileResults.java
public class FilledProfileResults implements ProfileResults {
...
protected String getProfilerResults(long $l, int $i) {
StringBuilder stringbuilder = new StringBuilder();
...
stringbuilder.append("Tick span: ").append($i).append(" ticks\n");
...
If we look at the above class, we can see that no checks are carried out to see what the value of the tick span is before printing the word "ticks" within the debug profiling report. In simpler terms, the word "ticks" is hardcoded therefore, will always be printed regardless of the value of the tick span.
Can confirm in 1.19.2. This ticket relates to MC-255060.
Can confirm.