1
0
forked from xjboss/KCauldronX

Some improvements in spigot timings and fix #179

This commit is contained in:
Prototik
2015-09-05 23:31:58 +07:00
parent 923b9e81a0
commit 9d56192606
8 changed files with 233 additions and 110 deletions

View File

@ -12,6 +12,7 @@ import kcauldron.updater.KCauldronUpdater;
import kcauldron.updater.KVersionRetriever;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.server.MinecraftServer;
import net.minecraft.world.WorldServer;
import net.minecraftforge.server.command.ForgeCommand;
public class KCauldronCommand extends Command {
@ -92,8 +93,8 @@ public class KCauldronCommand extends Command {
double worldTPS = Math.min(1000.0 / worldTickTime, 20);
sender.sendMessage(String.format("%s[%d] %s%s %s- %s%.2fms / %.2ftps", ChatColor.GOLD, dimensionId,
current ? ChatColor.GREEN : ChatColor.YELLOW, displayName, ChatColor.RESET, ChatColor.DARK_RED, worldTickTime,
worldTPS));
current ? ChatColor.GREEN : ChatColor.YELLOW, displayName, ChatColor.RESET, ChatColor.DARK_RED, worldTickTime,
worldTPS));
}
}
double meanTickTime = mean(server.tickTimeArray) * 1.0E-6D;

View File

@ -136,6 +136,9 @@ public class SpigotTimings {
public final CustomTimingsHandler tracker;
public final CustomTimingsHandler doTick;
public final CustomTimingsHandler tickEntities;
public final CustomTimingsHandler weatherUpdate;
public final CustomTimingsHandler cleanupCache;
public final CustomTimingsHandler fullTick;
public final CustomTimingsHandler syncChunkLoadTimer;
public final CustomTimingsHandler syncChunkLoadDataTimer;
@ -173,6 +176,9 @@ public class SpigotTimings {
tracker = new CustomTimingsHandler(name + "tracker");
doTick = new CustomTimingsHandler(name + "doTick");
tickEntities = new CustomTimingsHandler(name + "tickEntities");
weatherUpdate = new CustomTimingsHandler(name + "weatherUpdate");
cleanupCache = new CustomTimingsHandler(name + "cleanupCache");
fullTick = new CustomTimingsHandler(name + "fullTick");
}
}
}