Spigot Timings

Overhauls the Timings System adding performance tracking all around the Minecraft Server

By: Aikar <aikar@aikar.co>
This commit is contained in:
CraftBukkit/Spigot
2013-01-10 00:18:11 -05:00
parent 127d8c1595
commit 78524cb95e
16 changed files with 924 additions and 387 deletions

View File

@@ -48,7 +48,23 @@
list.add(enumcreaturetype);
}
}
@@ -217,10 +238,15 @@
@@ -127,6 +148,7 @@
ProfilerFiller gameprofilerfiller = Profiler.get();
gameprofilerfiller.push("spawner");
+ world.timings.mobSpawn.startTiming(); // Spigot
Iterator iterator = spawnableGroups.iterator();
while (iterator.hasNext()) {
@@ -141,6 +163,7 @@
}
}
+ world.timings.mobSpawn.stopTiming(); // Spigot
gameprofilerfiller.pop();
}
@@ -217,10 +240,15 @@
entityinsentient.moveTo(d0, (double) i, d1, world.random.nextFloat() * 360.0F, 0.0F);
if (NaturalSpawner.isValidPositionForMob(world, entityinsentient, d2)) {
groupdataentity = entityinsentient.finalizeSpawn(world, world.getCurrentDifficultyAt(entityinsentient.blockPosition()), EntitySpawnReason.NATURAL, groupdataentity);
@@ -68,7 +84,7 @@
if (j >= entityinsentient.getMaxSpawnClusterSize()) {
return;
}
@@ -369,7 +395,7 @@
@@ -369,7 +397,7 @@
if (entityinsentient.checkSpawnRules(world, EntitySpawnReason.CHUNK_GENERATION) && entityinsentient.checkSpawnObstruction(world)) {
groupdataentity = entityinsentient.finalizeSpawn(world, world.getCurrentDifficultyAt(entityinsentient.blockPosition()), EntitySpawnReason.CHUNK_GENERATION, groupdataentity);
@@ -77,7 +93,7 @@
flag = true;
}
}
@@ -482,10 +508,12 @@
@@ -482,10 +510,12 @@
return this.unmodifiableMobCategoryCounts;
}