mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-19 18:04:07 +00:00
91 lines
3.1 KiB
PHP
91 lines
3.1 KiB
PHP
<?php
|
|
|
|
/*
|
|
*
|
|
* ____ _ _ __ __ _ __ __ ____
|
|
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
|
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
|
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
|
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Lesser General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* @author PocketMine Team
|
|
* @link http://www.pocketmine.net/
|
|
*
|
|
*
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace pocketmine\level;
|
|
|
|
use pocketmine\timings\TimingsHandler;
|
|
|
|
class LevelTimings{
|
|
|
|
/** @var TimingsHandler */
|
|
public $setBlock;
|
|
/** @var TimingsHandler */
|
|
public $doBlockLightUpdates;
|
|
/** @var TimingsHandler */
|
|
public $doBlockSkyLightUpdates;
|
|
|
|
/** @var TimingsHandler */
|
|
public $doChunkUnload;
|
|
/** @var TimingsHandler */
|
|
public $doTickPending;
|
|
/** @var TimingsHandler */
|
|
public $doTickTiles;
|
|
/** @var TimingsHandler */
|
|
public $doChunkGC;
|
|
/** @var TimingsHandler */
|
|
public $entityTick;
|
|
/** @var TimingsHandler */
|
|
public $tileEntityTick;
|
|
/** @var TimingsHandler */
|
|
public $doTick;
|
|
|
|
/** @var TimingsHandler */
|
|
public $syncChunkSendTimer;
|
|
/** @var TimingsHandler */
|
|
public $syncChunkSendPrepareTimer;
|
|
|
|
/** @var TimingsHandler */
|
|
public $syncChunkLoadTimer;
|
|
/** @var TimingsHandler */
|
|
public $syncChunkLoadDataTimer;
|
|
/** @var TimingsHandler */
|
|
public $syncChunkLoadEntitiesTimer;
|
|
/** @var TimingsHandler */
|
|
public $syncChunkLoadTileEntitiesTimer;
|
|
|
|
public function __construct(Level $level){
|
|
$name = $level->getFolderName() . " - ";
|
|
|
|
$this->setBlock = new TimingsHandler("** " . $name . "setBlock");
|
|
$this->doBlockLightUpdates = new TimingsHandler("** " . $name . "doBlockLightUpdates");
|
|
$this->doBlockSkyLightUpdates = new TimingsHandler("** " . $name . "doBlockSkyLightUpdates");
|
|
|
|
$this->doChunkUnload = new TimingsHandler("** " . $name . "doChunkUnload");
|
|
$this->doTickPending = new TimingsHandler("** " . $name . "doTickPending");
|
|
$this->doTickTiles = new TimingsHandler("** " . $name . "doTickTiles");
|
|
$this->doChunkGC = new TimingsHandler("** " . $name . "doChunkGC");
|
|
$this->entityTick = new TimingsHandler("** " . $name . "entityTick");
|
|
$this->tileEntityTick = new TimingsHandler("** " . $name . "tileEntityTick");
|
|
|
|
$this->syncChunkSendTimer = new TimingsHandler("** " . $name . "syncChunkSend");
|
|
$this->syncChunkSendPrepareTimer = new TimingsHandler("** " . $name . "syncChunkSendPrepare");
|
|
|
|
$this->syncChunkLoadTimer = new TimingsHandler("** " . $name . "syncChunkLoad");
|
|
$this->syncChunkLoadDataTimer = new TimingsHandler("** " . $name . "syncChunkLoad - Data");
|
|
$this->syncChunkLoadEntitiesTimer = new TimingsHandler("** " . $name . "syncChunkLoad - Entities");
|
|
$this->syncChunkLoadTileEntitiesTimer = new TimingsHandler("** " . $name . "syncChunkLoad - TileEntities");
|
|
|
|
$this->doTick = new TimingsHandler($name . "doTick");
|
|
}
|
|
}
|