Skip to content

TPS Bar

Shows TPS, MSPT and ping, memory, or a compass on a boss bar.

addon installtps-bar

Version
1.2.1
Runs on
JSPrismarine 0.23.0 or newer
License
(MIT OR MPL-2.0)

Boss bars that show how the server keeps up: its ticks per second (TPS), the milliseconds each tick's work takes (MSPT) and your ping, the memory its heap holds, and a compass. The RAM bar and the compass follow Purpur's, as Purpur Bars brings them to other servers.

The TPS bar three times: green with an idle server, gold at 32 MSPT, and red at 65 MSPT and 15 TPS

Using it

An operator runs a bar's command to turn it on, and again to turn it off:

  • /tpsbar: TPS, MSPT and ping.
  • /rambar: the memory the server's heap holds.
  • /compass: the directions around where you face.

To let every player use one, grant its node, jsp:tpsbar, jsp:rambar or jsp:compass, to the default group in permissions.json, or run /perms group default permission set jsp:tpsbar.

A bar is theirs alone: each player turns it on for themselves. The server remembers the choice, so the bar comes back when they rejoin and after a restart. A player can have every bar on at once.

Java Edition players see the same bars, with the ping their keep-alives measure.

The TPS bar

The bar redraws once a second. Each number is colored by its own thresholds:

Number Green Gold Red
TPS 19.5 or more 15 or more below 15
MSPT below 25 below 50 50 or more
Ping (ms) below 100 below 200 200 or more

The bar takes the worse of the two colors, in green, yellow or red. It fills as MSPT approaches 50, the milliseconds a tick has at 20 TPS, so a full bar means the server cannot keep up.

The ping does not change the bar's color, since it says how your connection keeps up rather than the server.

MSPT is the average over the last ten or so ticks rather than the last tick alone, so one slow tick does not turn the bar red for a whole second. Ping shows ? until your connection has measured a round trip.

The RAM bar

The bar shows the bytes the server's JavaScript heap holds out of the most it may grow to, and the share that makes, such as RAM: 512M/4.0G (12%). It fills with that share and redraws once a second. Buffers outside the heap, such as chunk data, are not counted. Like Purpur's, the numbers and the bar turn at different shares:

Share of the limit in use Green Gold or yellow Red
The numbers below 60% below 85% 85% or more
The bar below 50% below 75% 75% or more

The compass

The bar shows a strip of directions centered on where you face, with S, SW, W and so on between markers, and turns with you four times a second.

The config file

The addon writes addons/tps-bar.config.json, beside the addon's folder, the first time it loads, and adds any setting the file lacks:

Key Default What it does
showTpsBarByDefault false Shows the TPS bar to every player who has not turned it off with /tpsbar.

The server watches the file, so a change takes effect without a restart. A player's own choice always wins over the default. On a JSPrismarine too old to give addons config files, there is no file and the TPS bar stays off until a player turns it on.

Installing it

From the server console:

addon install tps-bar

It needs JSPrismarine 0.23.0 or newer. The RAM bar needs a release whose performance reports the heap, and on an older one /rambar says so. The pack also loads on Bedrock Dedicated Server, where each command says its bar needs JSPrismarine, since only JSPrismarine gives scripts these figures.

From the addon's README.md, version 1.2.1.

Commands ​

Each command's name is also its permission node in permissions.json. With no entry for the node, the command's level decides, so a command above level 0 needs an operator or a level meta. An entry that grants the node lets a player run the command at any level, and a node with a leading - takes it away, even from an operator. The command reference explains both.

CommandDescriptionPermissionLevelGranted to
/jsp:tpsbaralso /tpsbarShows or hides a bar with the server's TPS, MSPT and your ping.jsp:tpsbar1Operators
/jsp:rambaralso /rambarShows or hides a bar with the memory the server's heap uses.jsp:rambar1Operators
/jsp:compassalso /compassShows or hides a bar with the directions around where you face.jsp:compass1Operators

To let every player run /jsp:tpsbar, type this on the console:

perms group default permission set jsp:tpsbar