Add specialized entityBaseTick timer for item entities

since item merging is a potential hotspot, we want to know if this code section is a performance problem.
Current timers only tell us whether overall ticking of a particular entity is slow, but that includes movement and therefore isn't particularly helpful.
This commit is contained in:
Dylan K. Taylor
2023-03-19 15:59:06 +00:00
parent 7bc5d8c824
commit 054c06fab9
2 changed files with 48 additions and 38 deletions

View File

@@ -107,6 +107,8 @@ abstract class Timings{
/** @var TimingsHandler */
public static $livingEntityBaseTick;
public static TimingsHandler $itemEntityBaseTick;
/** @var TimingsHandler */
public static $schedulerSync;
/** @var TimingsHandler */
@@ -200,6 +202,7 @@ abstract class Timings{
self::$entityBaseTick = new TimingsHandler(self::INCLUDED_BY_OTHER_TIMINGS_PREFIX . "Entity Base Tick");
self::$livingEntityBaseTick = new TimingsHandler(self::INCLUDED_BY_OTHER_TIMINGS_PREFIX . "Entity Base Tick - Living");
self::$itemEntityBaseTick = new TimingsHandler(self::INCLUDED_BY_OTHER_TIMINGS_PREFIX . "Entity Base Tick - ItemEntity");
self::$schedulerSync = new TimingsHandler(self::INCLUDED_BY_OTHER_TIMINGS_PREFIX . "Scheduler - Sync Tasks");
self::$schedulerAsync = new TimingsHandler(self::INCLUDED_BY_OTHER_TIMINGS_PREFIX . "Scheduler - Async Tasks");