From 6a42a3d6f3b2d2bbcc25c021e7f250fcb428701f Mon Sep 17 00:00:00 2001 From: kremsy Date: Sat, 22 Feb 2014 13:05:05 +0100 Subject: [PATCH] memory usage --- application/core/Server/UsageReporter.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/core/Server/UsageReporter.php b/application/core/Server/UsageReporter.php index da45c2ea..3c9e77ab 100644 --- a/application/core/Server/UsageReporter.php +++ b/application/core/Server/UsageReporter.php @@ -45,7 +45,7 @@ class UsageReporter implements TimerListener { if ($this->maniaControl->settingManager->getSetting($this, self::SETTING_DISABLE_USAGE_REPORTING)) { return; } - + $properties = array(); $properties['ManiaControlVersion'] = ManiaControl::VERSION; @@ -55,6 +55,8 @@ class UsageReporter implements TimerListener { $properties['TitleId'] = $this->maniaControl->server->titleId; $properties['ServerName'] = Formatter::stripDirtyCodes($this->maniaControl->client->getServerName()); $properties['PlayerCount'] = $this->maniaControl->playerManager->getPlayerCount(); + $properties['MemoryUsage'] = memory_get_usage(); + $properties['MemoryPeakUsage'] = memory_get_peak_usage(); $maxPlayers = $this->maniaControl->client->getMaxPlayers(); $properties['MaxPlayers'] = $maxPlayers["CurrentValue"];