Properly time chunk loading and chunk sending on timings reports, closes #3895

This commit is contained in:
Dylan K. Taylor 2020-11-08 14:30:12 +00:00
parent 37ee3f2775
commit 55e0d9c520
2 changed files with 7 additions and 5 deletions

View File

@ -80,15 +80,14 @@ class LevelTimings{
$this->entityTick = new TimingsHandler("** " . $name . "entityTick");
$this->tileEntityTick = new TimingsHandler("** " . $name . "tileEntityTick");
$this->syncChunkSendTimer = new TimingsHandler("** " . $name . "syncChunkSend");
$this->syncChunkSendPrepareTimer = new TimingsHandler("** " . $name . "syncChunkSendPrepare");
Timings::init(); //make sure the timers we want are available
$this->syncChunkSendTimer = new TimingsHandler("** " . $name . "syncChunkSend", Timings::$playerChunkSendTimer);
$this->syncChunkSendPrepareTimer = new TimingsHandler("** " . $name . "syncChunkSendPrepare", Timings::$playerChunkSendTimer);
$this->syncChunkLoadTimer = new TimingsHandler("** " . $name . "syncChunkLoad");
$this->syncChunkLoadTimer = new TimingsHandler("** " . $name . "syncChunkLoad", Timings::$worldLoadTimer);
$this->syncChunkLoadDataTimer = new TimingsHandler("** " . $name . "syncChunkLoad - Data");
$this->syncChunkLoadEntitiesTimer = new TimingsHandler("** " . $name . "syncChunkLoad - Entities");
$this->syncChunkLoadTileEntitiesTimer = new TimingsHandler("** " . $name . "syncChunkLoad - TileEntities");
Timings::init(); //make sure the timer we want is available
$this->syncChunkSaveTimer = new TimingsHandler("** " . $name . "syncChunkSave", Timings::$worldSaveTimer);
$this->doTick = new TimingsHandler($name . "doTick");

View File

@ -59,6 +59,8 @@ abstract class Timings{
/** @var TimingsHandler */
public static $serverCommandTimer;
/** @var TimingsHandler */
public static $worldLoadTimer;
/** @var TimingsHandler */
public static $worldSaveTimer;
/** @var TimingsHandler */
public static $populationTimer;
@ -126,6 +128,7 @@ abstract class Timings{
self::$connectionTimer = new TimingsHandler("Connection Handler");
self::$schedulerTimer = new TimingsHandler("Scheduler");
self::$serverCommandTimer = new TimingsHandler("Server Command");
self::$worldLoadTimer = new TimingsHandler("World Load");
self::$worldSaveTimer = new TimingsHandler("World Save");
self::$populationTimer = new TimingsHandler("World Population");
self::$generationCallbackTimer = new TimingsHandler("World Generation Callback");