1

On a server I play on, we suffered from quite severe tick lag when the functions in our custom datapack were turned on. Turning off the functions returned the server to a more playable state.

Of course we like the custom things we made, so we want to figure out if one of the functions is particularly expensive to run. Is there a way to profile the performance of individual functions of a data pack on the server side, either via regular Minecraft configuration or via Spigot?

  • I guess you could make a command block chain that executes one of these functions 1000 times per tick and then look at the server's tickrate, either in F3 or in the server console. Then do the same with the next function and so on. Other than that, I don't know anything. But good question, maybe there's some magic you can do with commands to measure real time (independent of tickspeed). – Fabian Röling Sep 16 '18 at 11:33
2

The /debug command is useful for measuring performance. Use /debug start to start the profiling, wait a while, then /debug stop to end.

This produces a file in .minecraft\debug breaking down how long everything took to run. Kind of like the F3 pie-chart, but for the server rather than the client.

Profile results

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.