PocketMine-MP  1.4 - API 1.10.0
 All Classes Namespaces Functions Variables Pages
LevelTimings.php
1 <?php
2 
3 /*
4  *
5  * ____ _ _ __ __ _ __ __ ____
6  * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
7  * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
8  * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
9  * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
10  *
11  * This program is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License as published by
13  * the Free Software Foundation, either version 3 of the License, or
14  * (at your option) any later version.
15  *
16  * @author PocketMine Team
17  * @link http://www.pocketmine.net/
18  *
19  *
20 */
21 
22 namespace pocketmine\event;
23 
25 
27 
29  public $mobSpawn;
31  public $doChunkUnload;
33  public $doPortalForcer;
35  public $doTickPending;
37  public $doTickTiles;
39  public $doVillages;
41  public $doChunkMap;
43  public $doChunkGC;
45  public $doSounds;
47  public $entityTick;
49  public $tileEntityTick;
51  public $tileEntityPending;
53  public $tracker;
55  public $doTick;
57  public $tickEntities;
58 
60  public $syncChunkSendTimer;
62  public $syncChunkSendPrepareTimer;
63 
65  public $syncChunkLoadTimer;
67  public $syncChunkLoadDataTimer;
69  public $syncChunkLoadStructuresTimer;
71  public $syncChunkLoadEntitiesTimer;
73  public $syncChunkLoadTileEntitiesTimer;
75  public $syncChunkLoadTileTicksTimer;
77  public $syncChunkLoadPostTimer;
78 
79  public function __construct(Level $level){
80  $name = $level->getFolderName() . " - ";
81 
82  $this->mobSpawn = new TimingsHandler("** " . $name . "mobSpawn");
83  $this->doChunkUnload = new TimingsHandler("** " . $name . "doChunkUnload");
84  $this->doTickPending = new TimingsHandler("** " . $name . "doTickPending");
85  $this->doTickTiles = new TimingsHandler("** " . $name . "doTickTiles");
86  $this->doVillages = new TimingsHandler("** " . $name . "doVillages");
87  $this->doChunkMap = new TimingsHandler("** " . $name . "doChunkMap");
88  $this->doSounds = new TimingsHandler("** " . $name . "doSounds");
89  $this->doChunkGC = new TimingsHandler("** " . $name . "doChunkGC");
90  $this->doPortalForcer = new TimingsHandler("** " . $name . "doPortalForcer");
91  $this->entityTick = new TimingsHandler("** " . $name . "entityTick");
92  $this->tileEntityTick = new TimingsHandler("** " . $name . "tileEntityTick");
93  $this->tileEntityPending = new TimingsHandler("** " . $name . "tileEntityPending");
94 
95  $this->syncChunkSendTimer = new TimingsHandler("** " . $name . "syncChunkSend");
96  $this->syncChunkSendPrepareTimer = new TimingsHandler("** " . $name . "syncChunkSendPrepare");
97 
98  $this->syncChunkLoadTimer = new TimingsHandler("** " . $name . "syncChunkLoad");
99  $this->syncChunkLoadDataTimer = new TimingsHandler("** " . $name . "syncChunkLoad - Data");
100  $this->syncChunkLoadStructuresTimer = new TimingsHandler("** " . $name . "syncChunkLoad - Structures");
101  $this->syncChunkLoadEntitiesTimer = new TimingsHandler("** " . $name . "syncChunkLoad - Entities");
102  $this->syncChunkLoadTileEntitiesTimer = new TimingsHandler("** " . $name . "syncChunkLoad - TileEntities");
103  $this->syncChunkLoadTileTicksTimer = new TimingsHandler("** " . $name . "syncChunkLoad - TileTicks");
104  $this->syncChunkLoadPostTimer = new TimingsHandler("** " . $name . "syncChunkLoad - Post");
105 
106  $this->tracker = new TimingsHandler($name . "tracker");
107  $this->doTick = new TimingsHandler($name . "doTick");
108  $this->tickEntities = new TimingsHandler($name . "tickEntities");
109  }
110 
111 }