diff --git a/dev/tests/integration/framework/Magento/Test/Helper/Memory.php b/dev/tests/integration/framework/Magento/Test/Helper/Memory.php index 0e017a9849b39..97646c774a70b 100644 --- a/dev/tests/integration/framework/Magento/Test/Helper/Memory.php +++ b/dev/tests/integration/framework/Magento/Test/Helper/Memory.php @@ -104,17 +104,15 @@ public function getUnixProcessMemoryUsage($pid) */ public function getWinProcessMemoryUsage($pid) { - $output = $this->_shell->execute('tasklist /fi %s /fo CSV', array("PID eq $pid")); + $output = $this->_shell->execute('tasklist /fi %s /fo CSV /nh', array("PID eq $pid")); /** @link http://www.php.net/manual/en/wrappers.data.php */ $csvStream = 'data://text/plain;base64,' . base64_encode($output); $csvHandle = fopen($csvStream, 'r'); - $keys = fgetcsv($csvHandle); - $values = fgetcsv($csvHandle); + $stats = fgetcsv($csvHandle); fclose($csvHandle); - $stats = array_combine($keys, $values); - $result = $stats['Mem Usage']; + $result = $stats[4]; return self::convertToBytes($result); }