resetStatistics() 공개 메소드

public resetStatistics ( )
예제 #1
0
 private function titleTick()
 {
     if (!Terminal::hasFormattingCodes()) {
         return;
     }
     $d = Utils::getRealMemoryUsage();
     $u = Utils::getMemoryUsage(true);
     $usage = round($u[0] / 1024 / 1024, 2) . "/" . round($d[0] / 1024 / 1024, 2) . "/" . round($u[1] / 1024 / 1024, 2) . "/" . round($u[2] / 1024 / 1024, 2) . " MB @ " . Utils::getThreadCount() . " threads";
     echo "]0;" . $this->getName() . " " . $this->getPocketMineVersion() . " | Online " . count($this->players) . "/" . $this->getMaxPlayers() . " | Memory " . $usage . " | U " . round($this->network->getUpload() / 1024, 2) . " D " . round($this->network->getDownload() / 1024, 2) . " kB/s | TPS " . $this->getTicksPerSecond() . " | Load " . $this->getTickUsage() . "%";
     $this->network->resetStatistics();
 }
예제 #2
0
 private function titleTick()
 {
     if (!Terminal::hasFormattingCodes()) {
         return;
     }
     if ($this->getProperty("I/O.title-usage", true)) {
         $d = Utils::getRealMemoryUsage();
         $u = Utils::getMemoryUsage(true);
         $usage = sprintf("%g/%g/%g/%g MB @ %d threads", round($u[0] / 1024 / 1024, 2), round($d[0] / 1024 / 1024, 2), round($u[1] / 1024 / 1024, 2), round($u[2] / 1024 / 1024, 2), Utils::getThreadCount());
         echo "]0;" . $this->getName() . " " . $this->getPocketMineVersion() . '-#' . $this->getPocketMineBuild() . " | Online " . count($this->players) . "/" . $this->getMaxPlayers() . " | Memory " . $usage . " | U " . round($this->network->getUpload() / 1024, 2) . " D " . round($this->network->getDownload() / 1024, 2) . " kB/s | TPS " . $this->getTicksPerSecondAverage() . " | Load " . $this->getTickUsageAverage() . "%";
     }
     $this->network->resetStatistics();
 }