memory usage

This commit is contained in:
kremsy 2014-02-22 13:05:05 +01:00 committed by Steffen Schröder
parent ad691eb9f8
commit 6a42a3d6f3

View File

@ -45,7 +45,7 @@ class UsageReporter implements TimerListener {
if ($this->maniaControl->settingManager->getSetting($this, self::SETTING_DISABLE_USAGE_REPORTING)) { if ($this->maniaControl->settingManager->getSetting($this, self::SETTING_DISABLE_USAGE_REPORTING)) {
return; return;
} }
$properties = array(); $properties = array();
$properties['ManiaControlVersion'] = ManiaControl::VERSION; $properties['ManiaControlVersion'] = ManiaControl::VERSION;
@ -55,6 +55,8 @@ class UsageReporter implements TimerListener {
$properties['TitleId'] = $this->maniaControl->server->titleId; $properties['TitleId'] = $this->maniaControl->server->titleId;
$properties['ServerName'] = Formatter::stripDirtyCodes($this->maniaControl->client->getServerName()); $properties['ServerName'] = Formatter::stripDirtyCodes($this->maniaControl->client->getServerName());
$properties['PlayerCount'] = $this->maniaControl->playerManager->getPlayerCount(); $properties['PlayerCount'] = $this->maniaControl->playerManager->getPlayerCount();
$properties['MemoryUsage'] = memory_get_usage();
$properties['MemoryPeakUsage'] = memory_get_peak_usage();
$maxPlayers = $this->maniaControl->client->getMaxPlayers(); $maxPlayers = $this->maniaControl->client->getMaxPlayers();
$properties['MaxPlayers'] = $maxPlayers["CurrentValue"]; $properties['MaxPlayers'] = $maxPlayers["CurrentValue"];