Add timer measurements for autosave

This commit is contained in:
Dylan K. Taylor
2019-03-02 18:20:25 +00:00
parent 382488dd07
commit 2bffd5cc1c
3 changed files with 9 additions and 3 deletions

View File

@@ -398,7 +398,10 @@ class LevelManager{
if($this->autoSave and ++$this->autoSaveTicker >= $this->autoSaveTicks){
$this->autoSaveTicker = 0;
$this->server->getLogger()->debug("[Auto Save] Saving worlds...");
$start = microtime(true);
$this->doAutoSave();
$this->server->getLogger()->debug("[Auto Save] Save completed in " . round(microtime(true) - $start, 3) . "s");
}
}