Table of Contents

Class PerformanceParsers

Namespace
McServerLauncher.Services
Assembly
McServerLauncher.dll

Reads the lines that tell how fast a server is running: its own lag warnings and the answers of spark tps, vanilla's tick query and Paper's tps.

public static class PerformanceParsers
Inheritance
PerformanceParsers
Inherited Members

Remarks

Everything is anchored on the start of the message (MessageBody(string)), the way SaveConfirmation is, because a player can type any text into the chat and chat passes through the console too. Chat always begins with the player's name in angle brackets, so a line that begins with these words is not chat.

The formats were fixed on 2026-10-22 from the output of real servers (Fabric with spark 1.10 and Paper 26.2 on Minecraft 26.2), and three things in them are traps:

  • spark tags its lines with [⚡]. On Windows the symbol arrives as ? or as scrambled bytes, so the tag is any run of up to four non-ASCII-letter characters, never the symbol itself.
  • Paper colours its console with ANSI escapes inside the line, and servers may use § codes; both are removed first.
  • Numbers use the machine's decimal separator: Paper printed 20,0, 20,0, 20,0 on a Spanish system. Figures are read with either, and the commas that separate values are told apart because a decimal comma always has one digit on each side without a space.
  • Vanilla prints the later lines of tick query without a log prefix at all.

Methods

Parse(string?)

Reads one console line.

public static PerfLine Parse(string? line)

Parameters

line string

Returns

PerfLine